private void but_new_Click(object sender, EventArgs e) { HCSCM_set_manager_set_new hcsm = new HCSCM_set_manager_set_new(); //获取一个值,指是否在Windows任务栏中显示窗体。 hcsm.ShowInTaskbar = false; hcsm.ShowDialog(); }
//private void Loaddata(string cu_barcode) //{ // dgv_01.Rows.Clear(); // CnasRemotCall reCnasRemotCall = new CnasRemotCall(); // SortedList sttemp01 = new SortedList(); // sttemp01.Add(1, CnasBaseData.SystemID); // DataTable getdt = null; // if (cu_barcode == null) // { // // string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-sec004", sttemp01); // getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-sec004", sttemp01); // } // else // { // sttemp01.Add(2, cu_barcode); // // string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-sec003", sttemp01); // getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-sec003", sttemp01); // } // if (getdt != null) // { // int ii = getdt.Rows.Count; // if (ii <= 0) return; // dgv_01.RowCount = ii; // for (int i = 0; i < ii; i++) // { // dgv_01.Rows[i].Cells["select"].Value = false; // // if (getdt.Columns.Contains("urgent") && getdt.Rows[i]["urgent"] != null) dgv_01.Rows[i].Cells["urgent"].Value = (getdt.Rows[i]["urgent"].ToString() == "1") ? "是" : "否"; // if (getdt.Columns.Contains("ca_priorityName") && getdt.Rows[i]["ca_priorityName"] != null) dgv_01.Rows[i].Cells["ca_priorityName"].Value = getdt.Rows[i]["ca_priorityName"].ToString(); // if (getdt.Columns.Contains("base_name") && getdt.Rows[i]["base_name"] != null) dgv_01.Rows[i].Cells["base_name"].Value = getdt.Rows[i]["base_name"].ToString(); // if (getdt.Columns.Contains("id") && getdt.Rows[i]["id"] != null) dgv_01.Rows[i].Cells["id"].Value = getdt.Rows[i]["id"].ToString(); // if (getdt.Columns.Contains("ca_name") && getdt.Rows[i]["ca_name"] != null) dgv_01.Rows[i].Cells["ca_name"].Value = getdt.Rows[i]["ca_name"].ToString(); // if (getdt.Columns.Contains("cost_center") && getdt.Rows[i]["cost_center"] != null) dgv_01.Rows[i].Cells["cost_center"].Value = Sl_type_01[getdt.Rows[i]["cost_center"].ToString()].ToString(); // if (getdt.Columns.Contains("bar_code") && getdt.Rows[i]["bar_code"] != null) dgv_01.Rows[i].Cells["bar_code"].Value = getdt.Rows[i]["bar_code"].ToString(); // if (getdt.Columns.Contains("ca_position") && getdt.Rows[i]["ca_position"] != null) dgv_01.Rows[i].Cells["ca_position"].Value = getdt.Rows[i]["ca_position"].ToString(); // if (getdt.Columns.Contains("cre_date") && getdt.Rows[i]["cre_date"] != null) dgv_01.Rows[i].Cells["cre_date"].Value = getdt.Rows[i]["cre_date"].ToString(); // if (getdt.Columns.Contains("mod_date") && getdt.Rows[i]["mod_date"] != null) dgv_01.Rows[i].Cells["mod_date"].Value = getdt.Rows[i]["mod_date"].ToString(); // if (getdt.Columns.Contains("storage_id") && getdt.Rows[i]["storage_id"] != null) dgv_01.Rows[i].Cells["storage_id"].Value = getdt.Rows[i]["storage_id"].ToString() == "0" ? "" : Sl_id[getdt.Rows[i]["storage_id"].ToString()].ToString(); // if (getdt.Columns.Contains("location_id") && getdt.Rows[i]["location_id"] != null) dgv_01.Rows[i].Cells["location_id"].Value = getdt.Rows[i]["location_id"].ToString() == "" ? "" : Sl_location[getdt.Rows[i]["location_id"].ToString()].ToString(); // if (getdt.Columns.Contains("customer_code") && getdt.Rows[i]["customer_code"] != null) dgv_01.Rows[i].Cells["customer_code"].Value = Sl_type_02[getdt.Rows[i]["customer_code"].ToString()].ToString(); // if (getdt.Columns.Contains("in_cycle") && getdt.Rows[i]["in_cycle"] != null) dgv_01.Rows[i].Cells["in_cycle"].Value = (getdt.Rows[i]["in_cycle"].ToString() == "9") ? "否" : "是"; // if (getdt.Columns.Contains("urgent") && getdt.Rows[i]["urgent"] != null) dgv_01.Rows[i].Cells["urgent"].Value = getdt.Rows[i]["urgent"].ToString(); // if (getdt.Columns.Contains("rfid_retrospect") && getdt.Rows[i]["rfid_retrospect"] != null) dgv_01.Rows[i].Cells["rfid_retrospect"].Value = getdt.Rows[i]["rfid_retrospect"].ToString(); // if (getdt.Columns.Contains("ca_priority") && getdt.Rows[i]["ca_priority"] != null) dgv_01.Rows[i].Cells["ca_priority"].Value = getdt.Rows[i]["ca_priority"].ToString().Trim(); // } // } // if(dgv_01.Rows.Count>0) // { // dgv_01.CurrentRow = dgv_01.Rows[0]; // } //} private void but_new_Click(object sender, EventArgs e) { HCSCM_set_manager_set_new hcsm = new HCSCM_set_manager_set_new(); //获取一个值,指是否在Windows任务栏中显示窗体。 hcsm.ShowInTaskbar = false; hcsm.ShowDialog(); GetData(); if (dgv_01.Rows.Count > 0) { dgv_01.CurrentRow = dgv_01.Rows[dgv_01.RowCount - 1]; } }