public UcCertificateDetails(List <string> cer_details) { InitializeComponent(); Cer_details = cer_details; _card_id.Text = Cer_details[0]; _company.Text = Cer_details[1]; _detect_object.Text = Cer_details[2]; _object_count.Text = ConvertStr.convert_object(Cer_details[3]) + Cer_details[4]; _phone.Text = Cer_details[5]; _for_use.Text = Cer_details[6]; _city_ks.Text = Cer_details[7]; _region_ks.Text = Cer_details[8]; _town_ks.Text = Cer_details[9]; _village_ks.Text = Cer_details[10]; _city_js.Text = Cer_details[11]; _region_js.Text = Cer_details[12]; _town_js.Text = Cer_details[13]; _village_js.Text = Cer_details[14]; _object_lable.Text = Cer_details[15]; _user_name.Text = Cer_details[16]; _user_id.Text = Cer_details[17]; _nian.Text = ConvertStr.convert_nian(Cer_details[18]); _yue.Text = ConvertStr.convert_yue(Cer_details[19]); _day.Text = ConvertStr.convert_day(Cer_details[20]); }
public CertificatePreview(IDBOperation dbOperation, string card_id) { InitializeComponent(); this.dbOperation = dbOperation; this.cardId = card_id; DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_certificate_main('{0}')", cardId)).Tables[0]; if (table.Rows.Count > 0) { _card_id.Text = table.Rows[0][0].ToString(); _company.Text = table.Rows[0][2].ToString(); _phone.Text = table.Rows[0][6].ToString(); _detect_object.Text = table.Rows[0][4].ToString(); _object_count.Text = table.Rows[0][5].ToString(); _for_use.Text = table.Rows[0][7].ToString(); _city_ks.Text = table.Rows[0][8].ToString(); _region_ks.Text = table.Rows[0][9].ToString(); _town_ks.Text = table.Rows[0][10].ToString(); _village_ks.Text = table.Rows[0][11].ToString(); _city_js.Text = table.Rows[0][12].ToString(); _region_js.Text = table.Rows[0][13].ToString(); _town_js.Text = table.Rows[0][14].ToString(); _village_js.Text = table.Rows[0][15].ToString(); _object_lable.Text = table.Rows[0][16].ToString(); _user_name.Text = table.Rows[0][17].ToString(); _user_id.Text = table.Rows[0][21].ToString(); _nian.Text = ConvertStr.convert_nian(table.Rows[0][18].ToString()); _yue.Text = ConvertStr.convert_yue(table.Rows[0][19].ToString()); _day.Text = ConvertStr.convert_day(table.Rows[0][20].ToString()); } }
public CertificateProductPreview(IDBOperation dbOperation, string card_id) { InitializeComponent(); this.dbOperation = dbOperation; this.cardId = card_id; DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("call p_certificate_product_main('{0}')", cardId)).Tables[0]; if (table.Rows.Count > 0) { _card_id.Text = table.Rows[0][0].ToString(); _company.Text = table.Rows[0][2].ToString(); _product_name.Text = table.Rows[0][4].ToString(); _object_count.Text = table.Rows[0][5].ToString(); _cz_cardid.Text = table.Rows[0][3].ToString(); _product_area.Text = table.Rows[0][6].ToString(); _dept_name.Text = table.Rows[0][7].ToString() + " " + table.Rows[0][8].ToString(); _mdd.Text = table.Rows[0][9].ToString(); _bz.Text = table.Rows[0][10].ToString(); _user_name.Text = table.Rows[0][11].ToString(); _user_id.Text = table.Rows[0][15].ToString(); _nian.Text = ConvertStr.convert_nian(table.Rows[0][12].ToString()); _yue.Text = ConvertStr.convert_yue(table.Rows[0][13].ToString()); _day.Text = ConvertStr.convert_day(table.Rows[0][14].ToString()); } }
public UcCertificateProductDetails(List <string> cer_details) { InitializeComponent(); Cer_details = cer_details; _card_id.Text = Cer_details[0]; _company.Text = Cer_details[1]; _product_name.Text = Cer_details[3]; //针对清真存在.5的情况,判断如下: //判断输入的是否为小数 bool flag = true; string object_count = Cer_details[4]; foreach (char c in object_count) { if (c == '.') { flag = false; } } if (flag == true) { _object_count.Text = ConvertStr.convert_object(object_count) + Cer_details[5]; } else { string count_dot = ConvertStr.convert_object_dot(object_count); count_dot = count_dot.Replace("零点半", "半" + Cer_details[5]); count_dot = count_dot.Replace("点", Cer_details[5]); _object_count.Text = count_dot; } _product_area.Text = Cer_details[6]; _dept_name.Text = Cer_details[7]; _dept_area.Text = Cer_details[8]; _mdd.Text = Cer_details[9]; _cz_cardid.Text = Cer_details[2]; _bz.Text = Cer_details[10]; _user_name.Text = Cer_details[11]; _user_id.Text = Cer_details[12]; _nian.Text = ConvertStr.convert_nian(Cer_details[13]); _yue.Text = ConvertStr.convert_yue(Cer_details[14]); _day.Text = ConvertStr.convert_day(Cer_details[15]); }
public UcCreateCertificate(IDBOperation dbOperation) { InitializeComponent(); this.dbOperation = dbOperation; _user_name.Text = username; _user_id.Text = loginid; _nian.Text = ConvertStr.convert_nian(DateTime.Now.Year.ToString()); _yue.Text = ConvertStr.convert_yue(DateTime.Now.Month.ToString()); _day.Text = ConvertStr.convert_day(DateTime.Now.Day.ToString()); //出证人所属的市级单位,及出证人所属部门货主信息flag,赋值启运地点 DataTable table = dbOperation.GetDbHelper().GetDataSet("select sys_city.name as city,ifnull(a.shipperflag,'') as shipperflag," + " tzcname,tzcarea,tzcaddress" + " from sys_client_sysdept a LEFT JOIN sys_city ON a.city = sys_city.id" + " where INFO_CODE = " + deptId).Tables[0]; if (table.Rows.Count != 0) { cityname = table.Rows[0][0].ToString(); shipperflag = table.Rows[0][1].ToString(); string tzcarea = table.Rows[0][3].ToString(); _city_ks.Text = tzcarea.Substring(0, 2).ToString(); _region_ks.Text = tzcarea.Substring(3, 3).ToString(); //_town_ks.Text = table.Rows[0][4].ToString(); _village_ks.Text = table.Rows[0][2].ToString(); } //检疫证号 string card_id = dbOperation.GetDbHelper().GetSingle(string.Format("select f_get_cardid('{0}')", deptId)).ToString(); _card_id.Text = card_id; //协检员 ComboboxTool.InitComboboxSource(_help_user, string.Format("call p_user_helpuser({0})", userId), "lr"); //动物种类 ComboboxTool.InitComboboxSource(_object_id, "SELECT animalid,animalname FROM t_animal_new WHERE openflag = '1' and deptflag = '" + shipperflag + "'", "lr"); _object_id.SelectionChanged += new SelectionChangedEventHandler(_object_id_SelectionChanged); _object_id.SelectedIndex = 1; //用途 ComboboxTool.InitComboboxSource(_for_use, "SELECT useid,usename FROM t_for_use WHERE openflag = '1'", "lr"); _for_use.SelectedIndex = 1; }
public UcCreateCertificate_product(IDBOperation dbOperation) { InitializeComponent(); this.dbOperation = dbOperation; _user_name.Text = username; _user_id.Text = loginid; _nian.Text = ConvertStr.convert_nian(DateTime.Now.Year.ToString()); _yue.Text = ConvertStr.convert_yue(DateTime.Now.Month.ToString()); _day.Text = ConvertStr.convert_day(DateTime.Now.Day.ToString()); //出证人所属部门货主信息flag,生产单位信息 DataTable table = dbOperation.GetDbHelper().GetDataSet("select ifnull(a.shipperflag,'') as shipperflag, " + " tzcname,tzcarea,tzcaddress,tzccardid " + " from sys_client_sysdept a " + " where INFO_CODE = " + deptId).Tables[0]; if (table.Rows.Count != 0) { shipperflag = table.Rows[0][0].ToString(); _dept_area.Text = table.Rows[0][2].ToString(); _dept_address.Text = table.Rows[0][3].ToString(); _dept_name.Text = table.Rows[0][1].ToString(); _cz_cardid.Text = table.Rows[0][4].ToString(); } //产品检疫证号 string product_cardid = dbOperation.GetDbHelper().GetSingle(string.Format("select f_get_productcardid('{0}')", deptId)).ToString(); _card_id.Text = product_cardid; //协检员 ComboboxTool.InitComboboxSource(_help_user, string.Format("call p_user_helpuser({0})", userId), "lr"); //产品名称 ComboboxTool.InitComboboxSource(_product_name, "SELECT productid,productname FROM t_product WHERE openflag = '1' and deptflag = '" + shipperflag + "'", "lr"); _product_name.SelectionChanged += new SelectionChangedEventHandler(_product_name_SelectionChanged); _product_name.SelectedIndex = 1; //生产单位 //ComboboxTool.InitComboboxSource(_dept_name, string.Format("call p_get_dept_tz({0})", userId), "lr"); //_dept_name.SelectionChanged += new SelectionChangedEventHandler(_dept_name_SelectionChanged); }