ADO学途 one day

博主分享第一个demo见解,先创建windows窗体前端,再新建数据库创建表并添加数据,接着实现程序功能。详细给出登录代码及注意代码,还提及数据页面增删改查,如整体显示数据到Datagridview的代码,强调增删改查sql语句可先在SQL server运行。

        博主在第一个demo的困苦中,略得一些见解,需要的伙伴可以get下

刚开始先创建一个程序的前端,这样对自己要实现的功能有一个直观的了解。分三

步:首先1.创建一个windows窗体。拖控件使程序接近真实的样子(列如:文字描述,

文本框,按钮等),然后再逐一实现功能。2.新建数据库创建表,有表了之后添加需

要的字段,字段有了就可以开始填加数据了,可以在程序未实现功能时先添加几条数

据,可供后面程序调试时用。3实现程序功能,这里细讲,博主也是无头绪和思路,通

过copy网络上的代码拼凑来实现功能的,但是copy并非复制粘贴,而是先看懂再自己

动手码。登录实现的一个思路:1.获取需要的数据的文本框的值,先做判空提示,不为

空则用if()else() 来判断文本框中的值是否存在于数据中,连接数据库登录代码:

 

using (SqlConnection con = new SqlConnection("server=.;uid=sa;pwd=123456;database=Study"))                                           //连接数据库 
{
con.Open();                                                                                                                                                                                    //打开连接
string sql = "select * from study where Name = '"+txbName.Text+"'and Number = '"+txbPwd.Text+"'";                                        //Sql语句块

SqlCommand cmd = new SqlCommand(sql, con);                                                                                                                         //   打开命令对象                                                                                     
cmd.CommandType = CommandType.Text;
SqlDataReader cdr;
cdr = cmd.ExecuteReader();
if (cdr.Read())
{
MessageBox.Show("登录成功!");                                                                                                                                                //提示语句
this.Visible = false;
Form2 f2 = new Form2();                                                                                                                                                               //实现窗体跳转
f2.ShowDialog();
}
else
{
MessageBox.Show("登录失败!");
return;
}

}

登录代码中需要注意的一些程序代码:SqlConnection,SqlCommand,SqlDataReader,ExecuteReader,

ShowDialog,MessageBox.Show,ShowDialog。了解其用途和含义完成登录后,程序

自然是缺不了对数据页面的增,删,改,查。首先是查,不是细查,而是在加载窗体时将数据库中的

数据整体显示到Datagridview中,需要重点了解的一些代码DataSet,SqlDataAdapter,da.Fill(dt),DefaultView;

了解用途和含义。值得一提的是增,删,改,查的sql语句可以在SQL server 中运行一遍,不然

出错的时候会瞎找半天问题。                        今天就分享到这里,如果有什么好的意见劳烦各位不吝指教。

 

哦,对了,未经允许不得转在哦~0-0

 

转载于:https://www.cnblogs.com/Duck1/p/10913692.html

有如下邮件内容,请问如何用python通过AI中的自然语言处理NLP的方法,总结出ADO任务的标题和简单的任务描述?From: Summer Sent: Friday, April 25, 2025 5:10 PM To: Pavan Cc: Candace; Xiaoyi Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 Dear Pavan, OK got that, how about point3 please? And if needed, please kindly provide me an ADO sample. Thank you! Best Regards, Summer HE -------------------------------------------------------------------------------------------------------- From: Pavan Sent: Friday, April 25, 2025 5:10 PM To: Summer Cc: Candace; Xiaoyi Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Hi Summer, Below is the reporting lake WI. Our target is to deploy the changes in one of the releases in August (either Aug 2nd or Aug 23rd). https://dev.azure.com/sc-ado/FMQPR/_workitems/edit/8540473 Regards, Pavan -------------------------------------------------------------------------------------------------------- From: Summer Sent: Friday, April 25, 2025 5:10 PM To: Pavan Cc: Candace; Xiaoyi Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Dear Pavan, Here are the points we discussed this noon time based on your below email, together with Sowmya and Xiaoyi. 1. Although only EMIR_Controls_Positions_Full report is impacted by GFOX, for consistency, your API call date for COB Fri file will be changed from Sat to Mon morning for all 3 Controls reports. Only OLA date is changed, while timing remains the same, i.e.: These 3 reports are generated around 3:00am GMT on Sat for COB Fri, and after release: 3:00am GMT on Mon for COB Fri. 2. For the rest 2 EMIR_Controls report, the records will be the same for COB Fri, even it is generated on Mon instead of Sat. 3. PaCman and RL/DQMA will make the release together during the same release window. 4. If GFOX trades booked in prod before release and get captured in EMIR_Controls_Positions_Full report, negative impact is: break will happen in recon. While COB Mon-Thu shouldn’t be impacted. Pending Actions: 1. Once GFOX trades happen in production, Summer to notify Pavan. 2. Pavan and Sowmya to further check internally on the release date. 3. Pavan to check with PO, if GFOX should be included into EMIR_Controls_Positions_Full report or not before our release. If the answer is no, PaCman will make a control from XTP side to exclude GFOX entries from EMIR_Controls_Positions_Full report. Thank you! Best Regards, Summer HE -------------------------------------------------------------------------------------------------------- From: Summer Sent: Friday, April 25, 2025 5:10 PM To: Ram Cc: Candace Xiaoyi Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Dear Ram, OK, thank you for confirmation on this! And for the 3 EMIR Controls report, do you think all of them can be changed to the new timing, for easier maintenance in future? Or only #3 should be changed (COB = Fri file to be generated on Mon) while the other 2 remain the same (COB = Fri file still generates on Sat)? 1. EMIR_Controls_Trades_Positions_Values.YYYYMMDD.csv - No impact, no need to include GFOX entries. 2. EMIR_ Controls _Collateral.YYYYMMDD.csv - No impact, no need to include GFOX entries. 3. EMIR_Controls_Positions_Full.YYYYMMDD.csv - To include GFOX entries. We only change the generation time of COB = Fri EMIR Controls report, and EMIR_Controls_Positions_Full.YYYYMMDD will include GFOX entries then. Thank you! Best Regards, Summer HE -------------------------------------------------------------------------------------------------------- From: Ramsunder Sent: Friday, April 25, 2025 5:29 PM To: Summer; Sheryl; Nandan; Singh; Gunipe; Pavan; Uttara Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Hi Summer, The requirements and understanding of these reports are as follows. 1. EMIR_Controls_Trades_Positions_Values.YYYYMMDD.csv -- I know no impact, but stating for common understanding. This report will Contain all daily Transaction , valuation and position of Records that are submitted by Brokers & ICE. 2. EMIR_Refit_Collateral.YYYYMMDD.csv – Similar to above point, no impact. This report will contain daily collateral submissions. 3. EMIR_Controls_Positions_Full.YYYYMMDD.csv - The expectation and requirement of this report is to have all OPEN position as of a day ( Irrespective of if its self Reported or Broker/Ice Reported). The usage of the content of the report might differ and as on today we might not be using all the content w.r.t Recon or MI. But the requirement is to have the full self + Broker/ICE related position information. So GFOX information should be included in this report. This part is clear. Now, changes to EOD timing will Impact RL , Recon and potentially DQMA too ( depending on how RL handles the changes to the timing). This was brought up to the team only in last week of April. I get to understand that TRACK is already receiving their files and they have gone Live with GFOX reporting. That is fine w,r,t Controls as we also consume self reported data from TRACK. But the Expectation of the “EMIR_Controls_Positions_Full.YYYYMMDD.csv” to have all Data needs to be met. So please co-ordinate with Reporting Lake and enable this change at a suitable date from everyone’s point of view. Pavan – you will have to discuss with Recon and DQMA too. Thanks & Rgds, Ram -------------------------------------------------------------------------------------------------------- From: Ramsunder Sent: Friday, April 25, 2025 5:29 PM To: Summer; Sheryl; Nandan; Singh; Gunipe; Pavan; Uttara Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Hi Summer, Looping in Appropriate teams. Friday EOD files being received on Monday morning instead of Sat morning – I don’t believe there is an impact to our side. @Gangulikar, Uttara Bhaskar / @DQMA Team – Can you please check and double confirm. This will obviously impact the OLA documents between systems. Once the team confirms, you will have to work with @Shivannagari, Pavan to update relevant OLA. @Shivannagari, Pavan – please check if you have to update anything from your side, in terms of monitoring etc. Thanks & Rgds, Ram -------------------------------------------------------------------------------------------------------- From: Summer Sent: Friday, April 25, 2025 5:10 PM To: Ram Cc: Candace Xiaoyi Subject: RE: DQMA Discussion for GFOX - meeting minutes 20241209 INTERNAL Dear Ram, Once GFOX goes live, considering of the EOD timing difference for Prime, you may receive the Friday EMIR Report the following Monday instead of Sat. OLA may be changed then. And PRIME EOD on Monday normally is around 11:00 AM SGT/03:00 AM GMT, when files are generated and sent to downstreams. While no impact to the reports for Mon – Thu. Are you fine with this please? Best Regards, Summer HE
08-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值