private void ImportKaijiang(DateTime importdate) { try { DateTime importDate = importdate; string url = GetKaijiangUrl(importDate); string jsonData = GetHtmlFromUrl(url); Dictionary<string, object> dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonData); String raceList = dict["raceList"].ToString(); Dictionary<string, object> dict2 = JsonConvert.DeserializeObject<Dictionary<string, object>>(raceList); String weekDay = dict["weekDay"].ToString(); string weekDate = dict["weekDate"].ToString(); foreach (string key in dict2.Keys) { string value = dict2[key].ToString(); Race race = JsonConvert.DeserializeObject<Race>(value); Kaijiang kaijiang = new Kaijiang(key, race); kaijiang.Xingqi = weekDay; kaijiang.Riqi = weekDate; //DateTimeFormatInfo dtFormat = new DateTimeFormatInfo(); //dtFormat.ShortDatePattern = "yyyyMMdd"; //dtFormat.LongDatePattern = "yyyyMMdd hh:mm"; DateTime temp = DateTime.ParseExact("20" + race.matchDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture); string bisaishijian = temp.ToString("yyyy-MM-dd") + " " + race.matchTime + ":00"; //kaijiang.Bisaishijian = DateTime.ParseExact(bisaishijian, "yyyyMMdd hh:mm:ss", System.Globalization.CultureInfo.CurrentCulture); kaijiang.Bisaishijian = Convert.ToDateTime(bisaishijian); kaijiang.EndTime = Convert.ToDateTime(race.endTime); new KaijiangDAL().InsertKaijiang(kaijiang); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void ImportKaijiang(DateTime importdate) { try { DateTime importDate = importdate; string url = GetKaijiangUrl(importDate); string jsonData = GetHtmlFromUrl(url); Dictionary<string, object> dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonData); String raceList = dict["raceList"].ToString(); Dictionary<string, object> dict2 = JsonConvert.DeserializeObject<Dictionary<string, object>>(raceList); String weekDay = dict["weekDay"].ToString(); string weekDate = dict["weekDate"].ToString(); foreach (string key in dict2.Keys) { string value = dict2[key].ToString(); Race race = JsonConvert.DeserializeObject<Race>(value); Kaijiang kaijiang = new Kaijiang(key, race); kaijiang.Xingqi = weekDay; kaijiang.Riqi = weekDate; kaijiang.Bisaishijian = Convert.ToDateTime(weekDate); new KaijiangDAL().InsertKaijiang(kaijiang); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void btnImportKaijiang_Click(object sender, EventArgs e) { //DateTime importDate = Convert.ToDateTime(txtImportDate.Text); //string uri = GetUrlFromDate(importDate); //string htmlData = GetHtmlFromUrl(uri); //MessageBox.Show(htmlData); //http://www.aicai.com/lotnew/jc/getMatchByDate.htm?lotteryType=jczq&cate=gd&dataStr=140814&time=1408156959982 try { DateTime importDate = Convert.ToDateTime(txtImportDate.Text); string url = GetKaijiangUrl(importDate); string jsonData = GetHtmlFromUrl(url); Dictionary<string, object> dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonData); String raceList = dict["raceList"].ToString(); Dictionary<string, object> dict2 = JsonConvert.DeserializeObject<Dictionary<string, object>>(raceList); String weekDay = dict["weekDay"].ToString(); string weekDate = dict["weekDate"].ToString(); foreach (string key in dict2.Keys) { string value = dict2[key].ToString(); Race race = JsonConvert.DeserializeObject<Race>(value); Kaijiang kaijiang = new Kaijiang(key, race); kaijiang.Xingqi = weekDay; kaijiang.Riqi = weekDate; new KaijiangDAL().InsertKaijiang(kaijiang); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private double GetSecondSp(Kaijiang kaijiang, double shengsp, double pingsp, double fusp) { double result = 0; if (shengsp >= pingsp && shengsp < fusp || shengsp >= fusp && shengsp < pingsp) { result = kaijiang.ShengSp; } if (pingsp > shengsp && pingsp <= fusp || pingsp >= fusp && pingsp <= shengsp ) { result = kaijiang.PingSp; } if (fusp > shengsp && fusp < pingsp || fusp > pingsp && fusp < shengsp) { result = kaijiang.FuSp; } return result; }
private double GetThirdSp(Kaijiang kaijiang, double shengsp, double pingsp, double fusp) { double result = 0; if (shengsp < pingsp && shengsp < fusp) { result = kaijiang.ShengSp; } if (pingsp <= shengsp && pingsp < fusp) { result = kaijiang.PingSp; } if (fusp <= shengsp && fusp <= pingsp) { result = kaijiang.FuSp; } return result; }
private void UpdateYuceDetail(string id, int lucky, Kaijiang kaijiang) { string conStr = "server=localhost;User Id=root;database=aicai;" + "Password=root;Character Set=utf8;"; using (MySqlConnection mySqlCon = new MySqlConnection(conStr)) { mySqlCon.Open(); using (MySqlCommand mySqlCom = mySqlCon.CreateCommand()) { string sql = @" UPDATE yuce_rawdata_analysis SET bianhao = ?bianhao, lucky = ?lucky, SpfResult = ?SpfResult, spfsp = ?Spfsp, RqspfResult = ?RqspfResult, rqspfsp = ?RqspfSp, rqshu = ?rqshu WHERE id = ?ID "; mySqlCom.CommandText = sql; mySqlCom.Parameters.AddWithValue("?bianhao", kaijiang.Bianhao); mySqlCom.Parameters.AddWithValue("?lucky", lucky); mySqlCom.Parameters.AddWithValue("?SpfResult", kaijiang.SpfResult); mySqlCom.Parameters.AddWithValue("?Spfsp", kaijiang.SpfSp); mySqlCom.Parameters.AddWithValue("?RqspfResult", kaijiang.RqspfResult); mySqlCom.Parameters.AddWithValue("?RqspfSp", kaijiang.RqspfSp); mySqlCom.Parameters.AddWithValue("?rqshu", kaijiang.RqShu); mySqlCom.Parameters.AddWithValue("?ID", id); mySqlCom.ExecuteScalar(); } } }
private double GetFirstSp(Kaijiang kaijiang, double shengsp,double pingsp,double fusp) { double result = 0; if (shengsp > pingsp && shengsp > fusp) { result = kaijiang.ShengSp; } if (pingsp > shengsp && pingsp > fusp) { result = kaijiang.PingSp; } if (fusp > shengsp && fusp > pingsp) { result = kaijiang.FuSp; } return result; }
public Kaijiang GetKaijiangByRiqiAndBianhao(string riqi, string bianhao) { string conStr = "server=localhost;User Id=root;database=aicai;" + "Password=root;Character Set=utf8;"; DataSet ds = new DataSet(); using (MySqlConnection mySqlCon = new MySqlConnection(conStr)) { mySqlCon.Open(); using (MySqlCommand mySqlCom = mySqlCon.CreateCommand()) { MySqlDataAdapter da = new MySqlDataAdapter(); //string sqlStr = @"Select bianhao,liansai,zhudui,kedui,rangqiu,shengsp,pingsp,fusp,riqi from peilv order by bianhao"; string sqlStr = @" SELECT * FROM kaijiang WHERE riqi = ?riqi AND bianhao = ?bianhao"; mySqlCom.CommandText = sqlStr; mySqlCom.Parameters.AddWithValue("?riqi", riqi); mySqlCom.Parameters.AddWithValue("?bianhao", bianhao); da.SelectCommand = mySqlCom; da.Fill(ds); } } if (ds.Tables[0].Rows.Count != 0) { DataRow row = ds.Tables[0].Rows[0]; Kaijiang kaijiang = new Kaijiang(); kaijiang.Riqi = row["riqi"].ToString(); kaijiang.Bianhao = row["bianhao"].ToString(); kaijiang.SpfResult = row["SpfResult"].ToString(); kaijiang.SpfSp = Convert.ToDouble(row["SpfSp"].ToString()); kaijiang.RqShu = Convert.ToInt32(row["RqShu"].ToString()); kaijiang.RqspfResult = row["RqspfResult"].ToString(); kaijiang.RqspfSp = Convert.ToDouble(row["RqspfSp"].ToString()); kaijiang.ShengSp = Convert.ToDouble(row["ShengSp"].ToString()); kaijiang.PingSp = Convert.ToDouble(row["PingSp"].ToString()); kaijiang.FuSp = Convert.ToDouble(row["FuSp"].ToString()); kaijiang.BqcResult = row["BqcResult"].ToString(); kaijiang.QcbfResult = row["QcbfResult"].ToString(); return kaijiang; } else { return null; } }
public bool InsertKaijiang(Kaijiang kaijiang) { int total = 0; string conStr = "server=localhost;User Id=root;database=aicai;" + "Password=root;Character Set=utf8;"; using (MySqlConnection mySqlCon = new MySqlConnection(conStr)) { mySqlCon.Open(); using (MySqlCommand mySqlCom = mySqlCon.CreateCommand()) { //这里需要注意的是在 Sql 语句中有一个参数是 ?BlogsName //很明显,这个参数有点古怪,和我们一直使用的 @ 不一样, //这是因为在 MySql 以前的提供的 .NET Connector 中 //都是采用 ? 来标志一个参数的,而现在的 .NET Connector 呢, //您既可以采用 ? 来标志一个参数,您也可以使用一个 @ 符号来标志一个参数 //新版的 .NET Connector 对此都是支持的 string sqlStr = @" insert into kaijiang( Xingqi, Riqi, Bianhao, Liansai, Bisaishijian, EndTime, Zhudui, Zhuduiliansai, Zhuduipaiming, Kedui, Keduiliansai, Keduipaiming, SpfResult, SpfSp, RqShu, RqspfResult, RqspfSp, QcbfResult, QcbfSp, ZjqResult, ZjqSp, BqcResult, BqcSp, Operator, OperateTime, ShengSp, PingSp, FuSp, RqShengSp, RqPingSp, RqFuSp, ShengSpInt, PingSpInt, FuSpInt, RqShengSpInt, RqPingSpInt, RqFuSpInt, ShengSpFracInt, PingSpFracInt, FuSpFracInt, RqShengSpFracInt, RqPingSpFracInt, RqFuSpFracInt ) values ( ?Xingqi, ?Riqi, ?Bianhao, ?Liansai, ?Bisaishijian, ?EndTime, ?Zhudui, ?Zhuduiliansai, ?Zhuduipaiming, ?Kedui, ?Keduiliansai, ?Keduipaiming, ?SpfResult, ?SpfSp, ?RqShu, ?RqspfResult, ?RqspfSp, ?QcbfResult, ?QcbfSp, ?ZjqResult, ?ZjqSp, ?BqcResult, ?BqcSp, ?Operator, ?OperateTime, ?ShengSp, ?PingSp, ?FuSp, ?RqShengSp, ?RqPingSp, ?RqFuSp, ?ShengSpInt, ?PingSpInt, ?FuSpInt, ?RqShengSpInt, ?RqPingSpInt, ?RqFuSpInt, ?ShengSpFracInt, ?PingSpFracInt, ?FuSpFracInt, ?RqShengSpFracInt, ?RqPingSpFracInt, ?RqFuSpFracInt ) "; mySqlCom.CommandText = sqlStr; mySqlCom.Parameters.AddWithValue("?Xingqi", kaijiang.Xingqi); mySqlCom.Parameters.AddWithValue("?Riqi", kaijiang.Riqi); mySqlCom.Parameters.AddWithValue("?Bianhao", kaijiang.Bianhao); mySqlCom.Parameters.AddWithValue("?Liansai", kaijiang.Liansai); mySqlCom.Parameters.AddWithValue("?Bisaishijian", kaijiang.Bisaishijian); mySqlCom.Parameters.AddWithValue("?EndTime", kaijiang.EndTime); mySqlCom.Parameters.AddWithValue("?Zhudui", kaijiang.Zhudui); mySqlCom.Parameters.AddWithValue("?Zhuduiliansai", kaijiang.Zhuduiliansai); mySqlCom.Parameters.AddWithValue("?Zhuduipaiming", kaijiang.Zhuduipaiming); mySqlCom.Parameters.AddWithValue("?Kedui", kaijiang.Kedui); mySqlCom.Parameters.AddWithValue("?Keduiliansai", kaijiang.Keduiliansai); mySqlCom.Parameters.AddWithValue("?Keduipaiming", kaijiang.Keduipaiming); mySqlCom.Parameters.AddWithValue("?SpfResult", kaijiang.SpfResult); mySqlCom.Parameters.AddWithValue("?SpfSp", kaijiang.SpfSp); mySqlCom.Parameters.AddWithValue("?RqShu", kaijiang.RqShu); mySqlCom.Parameters.AddWithValue("?RqspfResult", kaijiang.RqspfResult); mySqlCom.Parameters.AddWithValue("?RqspfSp", kaijiang.RqspfSp); mySqlCom.Parameters.AddWithValue("?QcbfResult", kaijiang.QcbfResult); mySqlCom.Parameters.AddWithValue("?QcbfSp", kaijiang.QcbfSp); mySqlCom.Parameters.AddWithValue("?ZjqResult", kaijiang.ZjqResult); mySqlCom.Parameters.AddWithValue("?ZjqSp", kaijiang.ZjqSp); mySqlCom.Parameters.AddWithValue("?BqcResult", kaijiang.BqcResult); mySqlCom.Parameters.AddWithValue("?BqcSp", kaijiang.BqcSp); mySqlCom.Parameters.AddWithValue("?Operator", kaijiang.Operator); mySqlCom.Parameters.AddWithValue("?OperateTime", kaijiang.OperateTime); mySqlCom.Parameters.AddWithValue("?ShengSp", kaijiang.ShengSp); mySqlCom.Parameters.AddWithValue("?PingSp", kaijiang.PingSp); mySqlCom.Parameters.AddWithValue("?FuSp", kaijiang.FuSp); mySqlCom.Parameters.AddWithValue("?RqShengSp", kaijiang.RqShengSp); mySqlCom.Parameters.AddWithValue("?RqPingSp", kaijiang.RqPingSp); mySqlCom.Parameters.AddWithValue("?RqFuSp", kaijiang.RqFuSp); mySqlCom.Parameters.AddWithValue("?ShengSpInt", kaijiang.ShengSpInt); mySqlCom.Parameters.AddWithValue("?PingSpInt", kaijiang.PingSpInt); mySqlCom.Parameters.AddWithValue("?FuSpInt", kaijiang.FuSpInt); mySqlCom.Parameters.AddWithValue("?RqShengSpInt", kaijiang.RqShengSpInt); mySqlCom.Parameters.AddWithValue("?RqPingSpInt", kaijiang.RqPingSpInt); mySqlCom.Parameters.AddWithValue("?RqFuSpInt", kaijiang.RqFuSpInt); mySqlCom.Parameters.AddWithValue("?ShengSpFracInt", kaijiang.ShengSpFracInt); mySqlCom.Parameters.AddWithValue("?PingSpFracInt", kaijiang.PingSpFracInt); mySqlCom.Parameters.AddWithValue("?FuSpFracInt", kaijiang.FuSpFracInt); mySqlCom.Parameters.AddWithValue("?RqShengSpFracInt", kaijiang.RqShengSpFracInt); mySqlCom.Parameters.AddWithValue("?RqPingSpFracInt", kaijiang.RqPingSpFracInt); mySqlCom.Parameters.AddWithValue("?RqFuSpFracInt", kaijiang.RqFuSpFracInt); try { total = Convert.ToInt32(mySqlCom.ExecuteScalar()); } catch(Exception ex){ MessageBox.Show(ex.Message); } } } return total == 0 ? true : false; }
public void UpdateYuce310Lucky(string id, string lucky,string rqlucky,string bifenlucky,string bqclucky,Kaijiang kaijiang) { string conStr = "server=localhost;User Id=root;database=aicai;" + "Password=root;Character Set=utf8;"; using (MySqlConnection mySqlCon = new MySqlConnection(conStr)) { mySqlCon.Open(); using (MySqlCommand mySqlCom = mySqlCon.CreateCommand()) { string sql = @" UPDATE yuce_samuel SET lucky = ?lucky, rqlucky = ?rqlucky, bifenlucky = ?bifenlucky, bqclucky = ?bqclucky, bqcresult = ?bqcresult, bifenresult = ?bifenresult, spfresultreal = ?spfresultreal, rqspfreal = ?rqspfreal WHERE id = ?ID "; mySqlCom.CommandText = sql; mySqlCom.Parameters.AddWithValue("?lucky", lucky); mySqlCom.Parameters.AddWithValue("?rqlucky", rqlucky); mySqlCom.Parameters.AddWithValue("?bifenlucky", bifenlucky); mySqlCom.Parameters.AddWithValue("?bqclucky", bqclucky); mySqlCom.Parameters.AddWithValue("?bqcresult", kaijiang.BqcResult); mySqlCom.Parameters.AddWithValue("?bifenresult", kaijiang.QcbfResult); mySqlCom.Parameters.AddWithValue("?spfresultreal", kaijiang.SpfResult); mySqlCom.Parameters.AddWithValue("?rqspfreal", kaijiang.RqspfResult); mySqlCom.Parameters.AddWithValue("?ID", id); mySqlCom.ExecuteScalar(); } } }
private void UpdateYuceDetail(string id, int lucky, Kaijiang kaijiang, string rangqiushu) { string conStr = "server=localhost;User Id=root;database=aicai;" + "Password=root;Character Set=utf8;"; using (MySqlConnection mySqlCon = new MySqlConnection(conStr)) { mySqlCon.Open(); using (MySqlCommand mySqlCom = mySqlCon.CreateCommand()) { string sql = @" UPDATE yuce_app SET lucky = ?lucky, realresult = ?SpfResult, realresultsp = ?Spfsp, operatetime = ?operatetime WHERE id = ?ID "; mySqlCom.CommandText = sql; mySqlCom.Parameters.AddWithValue("?lucky", lucky); if (rangqiushu == "0") { mySqlCom.Parameters.AddWithValue("?SpfResult", kaijiang.SpfResult); mySqlCom.Parameters.AddWithValue("?Spfsp", kaijiang.SpfSp); } else { mySqlCom.Parameters.AddWithValue("?SpfResult", kaijiang.RqspfResult); mySqlCom.Parameters.AddWithValue("?Spfsp", kaijiang.RqspfSp); } mySqlCom.Parameters.AddWithValue("?operatetime", DateTime.Now); mySqlCom.Parameters.AddWithValue("?ID", id); mySqlCom.ExecuteScalar(); } } }
private void btnImportResult_Click(object sender, EventArgs e) { //从开奖结果全里面导入开奖数据 HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument(); document.Load("html/开奖结果全0805.html", Encoding.UTF8); HtmlNode rootNode = document.DocumentNode; //class="gameTime" HtmlNode gameTime = rootNode.SelectSingleNode("//td[@class='gameTime']"); //MessageBox.Show(gameTime.InnerText); String xinqi = gameTime.InnerText.Substring(0, 3); String riqi = gameTime.InnerText.Substring(4, 10); //第一层tr节点 //class="jq_gdhh_match_select_tr evenTr" 偶数节点 //class="jq_gdhh_match_select_tr" 基数节点 HtmlNodeCollection matches = rootNode.SelectNodes("//tr[@class='jq_gdhh_match_select_tr']"); //class="phaoTd" //class="saiTd" foreach (HtmlNode match in matches) { Kaijiang kaijiang = new Kaijiang(); kaijiang.Xingqi = xinqi; kaijiang.Riqi = riqi; HtmlNode phaoTd = match.SelectSingleNode("./td[@class='phaoTd']"); kaijiang.Bianhao = phaoTd.InnerText; //MessageBox.Show(phaoTd.InnerText); HtmlNode saiTd = match.SelectSingleNode("./td[@class='saiTd']"); kaijiang.Liansai = saiTd.InnerText; //MessageBox.Show(saiTd.InnerText); //class="zhuTeamTd" HtmlNode zhuTeamTd = match.SelectSingleNode("./td[@class='zhuTeamTd']"); kaijiang.Zhudui = zhuTeamTd.SelectSingleNode("./div/span/a").InnerText; //MessageBox.Show(zhuTeamTd.InnerText); //class="keTeamTd" HtmlNode keTeamTd = match.SelectSingleNode("./td[@class='keTeamTd']"); kaijiang.Kedui = keTeamTd.SelectSingleNode("./div/span/a").InnerText ; HtmlNode brother = match.NextSibling.NextSibling; HtmlNodeCollection trs = brother.SelectNodes("./td/div/table/tbody/tr/td/div[@class='chanArea betChoose chanAreaRed']"); kaijiang.SpfResult = trs[0].SelectSingleNode("./p").ChildNodes[0].InnerText; kaijiang.SpfSp = Convert.ToDouble(trs[0].SelectSingleNode("./p/span").InnerText); kaijiang.RqspfResult = trs[1].SelectSingleNode("./p").ChildNodes[0].InnerText; kaijiang.RqspfSp = Convert.ToDouble(trs[1].SelectSingleNode("./p/span").InnerText); kaijiang.QcbfResult = trs[2].SelectSingleNode("./p").InnerText; kaijiang.QcbfSp = Convert.ToDouble(trs[2].SelectSingleNode("./span").InnerText); kaijiang.ZjqResult = trs[3].SelectSingleNode("./p").InnerText; kaijiang.ZjqSp = Convert.ToDouble(trs[3].SelectSingleNode("./span").InnerText); kaijiang.BqcResult = trs[4].SelectSingleNode("./p").InnerText; kaijiang.BqcSp = Convert.ToDouble(trs[4].SelectSingleNode("./span").InnerText); kaijiang.OperateTime = DateTime.Now; kaijiang.Operator = "吴林"; kaijiang.Bisaishijian = DateTime.MinValue ; kaijiang.Zhuduiliansai = ""; kaijiang.Keduiliansai = ""; new KaijiangDAL().InsertKaijiang(kaijiang); } HtmlNodeCollection matchesEven = rootNode.SelectNodes("//tr[@class='jq_gdhh_match_select_tr evenTr']"); //class="phaoTd" //class="saiTd" foreach (HtmlNode match in matchesEven) { Kaijiang kaijiang = new Kaijiang(); kaijiang.Xingqi = xinqi; kaijiang.Riqi = riqi; HtmlNode phaoTd = match.SelectSingleNode("./td[@class='phaoTd']"); kaijiang.Bianhao = phaoTd.InnerText; //MessageBox.Show(phaoTd.InnerText); HtmlNode saiTd = match.SelectSingleNode("./td[@class='saiTd']"); kaijiang.Liansai = saiTd.InnerText; //MessageBox.Show(saiTd.InnerText); //class="zhuTeamTd" HtmlNode zhuTeamTd = match.SelectSingleNode("./td[@class='zhuTeamTd']"); kaijiang.Zhudui = zhuTeamTd.SelectSingleNode("./div/span/a").InnerText; //MessageBox.Show(zhuTeamTd.InnerText); //class="keTeamTd" HtmlNode keTeamTd = match.SelectSingleNode("./td[@class='keTeamTd']"); kaijiang.Kedui = keTeamTd.SelectSingleNode("./div/span/a").InnerText; HtmlNode brother = match.NextSibling.NextSibling; HtmlNodeCollection trs = brother.SelectNodes("./td/div/table/tbody/tr/td/div[@class='chanArea betChoose chanAreaRed']"); kaijiang.SpfResult = trs[0].SelectSingleNode("./p").ChildNodes[0].InnerText; kaijiang.SpfSp = Convert.ToDouble(trs[0].SelectSingleNode("./p/span").InnerText); kaijiang.RqspfResult = trs[1].SelectSingleNode("./p").ChildNodes[0].InnerText; kaijiang.RqspfSp = Convert.ToDouble(trs[1].SelectSingleNode("./p/span").InnerText); kaijiang.QcbfResult = trs[2].SelectSingleNode("./p").InnerText; kaijiang.QcbfSp = Convert.ToDouble(trs[2].SelectSingleNode("./span").InnerText); kaijiang.ZjqResult = trs[3].SelectSingleNode("./p").InnerText; kaijiang.ZjqSp = Convert.ToDouble(trs[3].SelectSingleNode("./span").InnerText); kaijiang.BqcResult = trs[4].SelectSingleNode("./p").InnerText; kaijiang.BqcSp = Convert.ToDouble(trs[4].SelectSingleNode("./span").InnerText); kaijiang.OperateTime = DateTime.Now; kaijiang.Operator = "吴林"; kaijiang.Bisaishijian = DateTime.MinValue ; kaijiang.Zhuduiliansai = ""; kaijiang.Keduiliansai = ""; new KaijiangDAL().InsertKaijiang(kaijiang); } MessageBox.Show("导入数据成功!"); }