private void BindMain() { try { WaitingFrom.ShowWait(""); gc_Main.DataSource = null; DataTable dt = bllTqbSampModleJszx.GetList(txt_BZ.Text.Trim(), txt_GZ.Text.Trim()).Tables[0]; gc_Main.DataSource = dt; SetGridViewRowNum.SetRowNum(gv_Main); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void NewMethod() { try { WaitingFrom.ShowWait(""); DataTable dt = bll_StdMain.GetList_GroupStlGrd(txt_Grd.Text.Trim(), txt_STD_CODE.Text.Trim()).Tables[0]; this.gc_StdMain.DataSource = dt; gv_StdMain.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_StdMain); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 绑定物理性能分组信息 /// </summary> private void BindWL() { try { WaitingFrom.ShowWait(""); gc_Wl.DataSource = null; DataTable dt = bllTqbPhysicsGroup.GetAllList().Tables[0]; gc_Wl.DataSource = dt; SetGridViewRowNum.SetRowNum(gv_Wl); WaitingFrom.CloseWait(); } catch { } }
private void NewMethod1() { try { WaitingFrom.ShowWait(""); DataTable dt = bllReheting.Getlist_Query(txt_GZ.Text.Trim()).Tables[0]; this.gc_Time.DataSource = dt; gv_Time.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_Time); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait(""); DataTable dt = bll.Get_Slab_List(txt_Mat_Code.Text, txt_Mat_Name.Text, txt_GRD.Text, txt_Slab_Size.Text).Tables[0]; gc_Matrl.DataSource = dt; gv_Matrl.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_Matrl); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 下发计划 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Down_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_Num.Text.Trim())) { MessageBox.Show("请填写准备下发的计划炉数!"); return; } int result = 0; if (!int.TryParse(txt_Num.Text.Trim(), out result)) { MessageBox.Show("炉数只能填写整数!"); return; } if (DialogResult.No == MessageBox.Show("确认下发" + icbo_lz.Text.ToString() + "的" + txt_Num.Text.Trim() + "炉计划给MES?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)) { return; } WaitingFrom.ShowWait("正在下发,请稍等..."); string a = bllTppLgPlan.SendPlanToMes(icbo_lz.EditValue.ToString(), Convert.ToInt32(txt_Num.Text.Trim()), Application.StartupPath); WaitingFrom.CloseWait(); if (a == "1") { MessageBox.Show("下发成功!"); BindWXF(); } else if (a == "0") { MessageBox.Show("下发失败!"); return; } else { MessageBox.Show(a); return; } }
/// <summary> /// 轧钢实绩查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query_Main_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait(""); string pland = imgcbo_CJ.EditValue.ToString(); string batch = txt_BatchNo.Text; DataTable dt = bll_TRC_Roll_Product.GetList_Query(Convert.ToDateTime(dte_Begin.DateTime), Convert.ToDateTime(dte_End.DateTime), pland, batch).Tables[0]; this.gc_SJXX.DataSource = dt; gv_SJXX.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_SJXX); gv_SJXX_FocusedRowChanged(null, null); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BindList() { try { WaitingFrom.ShowWait(""); DataTable dt = bllLog.GetList(txt_Batch.Text.Trim(), dt_Start.Text.Trim(), dt_End.Text.Trim()).Tables[0]; gridControl1.DataSource = dt; SetGridViewRowNum.SetRowNum(gridView1); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 绑定制样主表信息 /// </summary> private void BindZYXX() { WaitingFrom.ShowWait(""); gc_ZYXX.DataSource = null; DataTable dt = bllTqcPhysicsResult.Get_XN_CWSX_List(dt_Start.Text.Trim(), dt_End.Text.Trim(), txt_BatchNo.Text.Trim()).Tables[0]; gc_ZYXX.DataSource = dt; gv_ZYXX.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_ZYXX); gv_ZYXX.Columns[13].Caption = "录入人"; gv_ZYXX.Columns[1].Visible = false; gv_ZYXX.Columns[2].Visible = false; WaitingFrom.CloseWait(); }
private void btn_CreatPlan_Click(object sender, EventArgs e) { WaitingFrom.ShowWait("正在生成轧钢计划,请稍后..."); //string result = bllTppLgPlan.Update_ZG_Plan_New(); string result = bllTppZgPlan.Update_ZG_Plan_New("0", "", "", "", "", ""); WaitingFrom.CloseWait(); if (result == "成功") { MessageBox.Show("计划生成成功!"); } else { MessageBox.Show(result); return; } }
/// <summary> /// 查询 /// </summary> private void Query() { try { WaitingFrom.ShowWait(""); DataTable dt = bllSpecificContent.GetList("").Tables[0]; gc_TSXX.DataSource = dt; gv_TSXX.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_TSXX); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void NewMethod() { WaitingFrom.ShowWait(""); string queryName = txt_queryDes.Text; DataTable dt = new DataTable(); if (string.IsNullOrEmpty(txt_queryDes.Text)) { dt = bll_file.GetList("").Tables[0]; } else { dt = bll_file.GetList("C_FILE_NAME like '%" + queryName + "%'").Tables[0]; } this.gc_StdFileb.DataSource = dt; gv_StdFileb.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_StdFileb); WaitingFrom.CloseWait(); }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query_Main_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait(""); DataTable dt = bll_roll_product.GetList_GP(dte_Begin1.DateTime, dte_End1.DateTime, txt_BatchNo.Text.Trim()).Tables[0]; gc_SJXX.DataSource = dt; gv_SJXX.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_SJXX); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BindMain() { try { WaitingFrom.ShowWait(""); gc_Main.DataSource = null; DataTable dt = bllRollPdd.GetList(dt_Start.Text.Trim(), dt_End.Text.Trim()).Tables[0]; gc_Main.DataSource = dt; SetGridViewRowNum.SetRowNum(gv_Main); WaitingFrom.CloseWait(); } catch { } }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait(""); gc_StdMain.DataSource = null; DataTable dt = bllMatrlMain.GetList_DFPCD(txt_CD.Text.Trim()).Tables[0]; gc_StdMain.DataSource = dt; gv_StdMain.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_StdMain); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 撤回开坯计划 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_canale_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait("计划正在撤回,请稍候..."); int[] rownumber = this.gv_KPZPJH.GetSelectedRows();//获取选中行号数组; int num = 0; for (int i = 0; i < rownumber.Length; i++) { int selectedHandle = rownumber[i]; string c_id = gv_KPZPJH.GetRowCellValue(selectedHandle, "C_ID").ToString(); Mod_TRP_PLAN_COGDOWN mod = bll_kp.GetModel(c_id); if (mod.N_STATUS == 1 && mod.N_GROUP_WGT == 0) { if (bll_kp.Delete(c_id)) { num++; } } } if (num > 0) { MessageBox.Show("需要撤回{" + rownumber.Length + "}条计划,已成功撤回{" + num + "}条计划!"); BindKP(); BindPlan(); } else { MessageBox.Show("撤回失败!"); } WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BindList() { try { WaitingFrom.ShowWait(""); DataTable dt = bllTspCastPlan.GetStopPlan(icbo_lz3.Properties.Items[this.icbo_lz3.SelectedIndex].Value.ToString(), dt_Start.Text.Trim(), dt_End.Text.Trim()); gc_Lgfx.DataSource = dt; gv_Lgfx.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_Lgfx); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Query1() { try { WaitingFrom.ShowWait(""); DataTable dt = bll_Update.GetList_Query_date(dte_Begin1.DateTime, dte_End1.DateTime, txt_BatchNo1.Text.Trim(), "1", "3").Tables[0]; gc_XL.DataSource = dt; gv_XL.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_XL); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query_Click(object sender, EventArgs e) { WaitingFrom.ShowWait(""); try { WaitingFrom.ShowWait(""); DataTable dt = bll_stdmain.GetList_QueryStdMatrl(txt_Std.Text.Trim(), txt_STL.Text.Trim()).Tables[0]; this.gc_Matrl.DataSource = dt; gv_Matrl.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_Matrl); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } WaitingFrom.CloseWait(); }
/// <summary> /// 查询批号信息 /// </summary> private void BindBatchList() { try { WaitingFrom.ShowWait(""); gc_Batch.DataSource = null; DataTable dt = bllTrcRollProdcut.GetList_TB(dt_Start.Text.Trim(), dt_End.Text.Trim(), txt_BatchNo.Text.Trim()).Tables[0]; gc_Batch.DataSource = dt; SetGridViewRowNum.SetRowNum(gv_Batch); WaitingFrom.CloseWait(); } catch { } }
private void Query1() { try { WaitingFrom.ShowWait(""); DataTable dt = bll_roll_product.GetList_XL(dte_Begin1.DateTime, dte_End1.DateTime, txt_BatchNo1.Text.Trim()).Tables[0]; gc_SJXX.DataSource = dt; gv_SJXX.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_SJXX); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Query1_Click(object sender, EventArgs e) { try { WaitingFrom.ShowWait(""); DataTable dt = bll.GetList(dte_Begin.DateTime, dte_End.DateTime, txt_Stove1.Text.Trim()).Tables[0]; gc_GPGP.DataSource = dt; gv_GPGP.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_GPGP); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_query_zg_Click(object sender, EventArgs e) { WaitingFrom.ShowWait(""); string strLineID = ""; if (this.icbo_zx4.SelectedIndex > 0) { strLineID = icbo_zx4.Properties.Items[this.icbo_zx4.SelectedIndex].Value.ToString(); } string strSFZP = ""; int SFXF = 0; if (this.rbtn_zg.SelectedIndex == 0) { SFXF = 0; strSFZP = ""; } if (this.rbtn_zg.SelectedIndex == 1) { SFXF = 1; strSFZP = ""; } if (this.rbtn_zg.SelectedIndex == 2) { SFXF = 1; strSFZP = "Y"; } DataTable dt = bll_plan.GetZGJH(strLineID, SFXF, txt_gz4.Text.Trim(), "", txt_bz4.Text.Trim(), strSFZP).Tables[0]; AutoSort(dt); dt = bll_plan.GetZGJH(strLineID, this.rbtn_zg.SelectedIndex, txt_gz4.Text.Trim(), "", txt_bz4.Text.Trim(), strSFZP).Tables[0]; dtzgjh = dt; this.gridControl1.DataSource = dt; this.gridView1.OptionsView.ColumnAutoWidth = false; this.gridView1.OptionsSelection.MultiSelect = true; gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; SetGridViewRowNum.SetRowNum(gridView1); this.gridView1.BestFitColumns(); WaitingFrom.CloseWait(); }
private void BindPlan() { try { WaitingFrom.ShowWait("数据正在加载中,请稍候..."); string C_STA_ID = this.icbo_zx3.Properties.Items[this.icbo_zx3.SelectedIndex].Value.ToString(); DataTable lst = bll_kp.GetList(C_STA_ID, 1, false, txt_lh.Text.Trim(), txt_gz.Text.Trim(), txt_bz.Text.Trim()).Tables[0]; this.modTRPPLANCOGDOWNBindingSource.DataSource = lst; this.gv_KPZPJH.OptionsView.ColumnAutoWidth = false; this.gv_KPZPJH.OptionsSelection.MultiSelect = true; gv_KPZPJH.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; SetGridViewRowNum.SetRowNum(gv_KPZPJH); this.gv_KPZPJH.BestFitColumns(); WaitingFrom.CloseWait(); } catch { } }
public void BindList() { try { gc_Route.DataSource = null; string RH = ""; string DHL = ""; string KP = ""; string HL = ""; string XM = ""; if (chk_RH1.Checked) { RH = "RH"; } if (chk_DFPHL1.Checked) { DHL = "DHL"; } if (chk_KP1.Checked) { KP = "KP"; } if (chk_HL1.Checked) { HL = "HL"; } if (chk_XM1.Checked) { XM = "XM"; } WaitingFrom.ShowWait(""); DataTable dt = bllRoute.GetList(RH, DHL, KP, HL, XM, txt_Std_Query.Text.Trim(), txt_Grd1.Text.Trim(), strPhyCode).Tables[0]; gc_Route.DataSource = dt; gv_Route.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_Route); WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_canale_Click(object sender, EventArgs e) { try { //for (int i = 0; i < Convert.ToInt32(this.txt_num.Text); i++) //{ // Mod_TRP_PLAN_ROLL modpx = bll_plan.GetModel(gridView1.GetRowCellValue(i, "C_ID").ToString()); // modpx.N_STATUS = 0; // bll_plan.Update(modpx); //} WaitingFrom.ShowWait(""); DataTable dtdchs = dtzgjh.Clone(); //选中的需要评价的订单 int[] rownumber = this.gridView1.GetSelectedRows(); //获取选中行号数组; if (rownumber.Length > 0) { for (int i = 0; i < rownumber.Length; i++) { int selectedHandle = rownumber[i]; DataRow dr = dtdchs.NewRow(); dr.ItemArray = this.gridView1.GetDataRow(i).ItemArray; dtdchs.Rows.Add(dr); } dtdchs.DefaultView.Sort = " N_SORT "; //将选中的订单按照排产目标进行排序 dtdchs = dtdchs.DefaultView.ToTable(); //获取的需要初始化的表 } for (int j = 0; j < dtdchs.Rows.Count; j++) { string C_PLAN_ID = dtdchs.Rows[j]["C_ID"].ToString(); Mod_TRP_PLAN_ROLL modPlan = bll_plan.GetModel(C_PLAN_ID); modPlan.N_STATUS = 0; bll_plan.Update(modPlan); } btn_query_zg_Click(null, null); WaitingFrom.CloseWait(); } catch (Exception) { btn_query_zg_Click(null, null); } }
private void Query1() { try { WaitingFrom.ShowWait(""); DataTable dt = bll_Update.GetList_Query_date_log(dte_Begin1.DateTime, dte_End1.DateTime, txt_BatchNo1.Text.Trim(), txt_STLGRD.Text.Trim(), imgcbo_Type.Text.Trim()).Tables[0]; dt.Columns.Add("总修料时间", typeof(double)); for (int i = 0; i < dt.Rows.Count; i++) { if (!string.IsNullOrEmpty(dt.Rows[i]["修料申请时间"].ToString()) && !string.IsNullOrEmpty(dt.Rows[i]["还料确认时间"].ToString()) && !string.IsNullOrEmpty(dt.Rows[i]["质量确认时间"].ToString())) { DateTime date = Convert.ToDateTime(dt.Rows[i]["还料确认时间"].ToString()); if ((Convert.ToDateTime(dt.Rows[i]["还料确认时间"].ToString())) >= (Convert.ToDateTime(dt.Rows[i]["质量确认时间"].ToString()))) { date = Convert.ToDateTime(dt.Rows[i]["还料确认时间"].ToString()); } if ((Convert.ToDateTime(dt.Rows[i]["质量确认时间"].ToString())) >= (Convert.ToDateTime(dt.Rows[i]["还料确认时间"].ToString()))) { date = Convert.ToDateTime(dt.Rows[i]["质量确认时间"].ToString()); } System.TimeSpan da = date - Convert.ToDateTime(dt.Rows[i]["修料申请时间"].ToString()); double ts = Math.Round(da.TotalHours); dt.Rows[i]["总修料时间"] = ts; } } gc_XL.DataSource = dt; gv_XL.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_XL); gv_XL.Columns[10].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; //求和 gv_XL.Columns[11].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; //求和 gv_XL.Columns[12].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; //求和 WaitingFrom.CloseWait(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 绑定库存钢坯数据 /// </summary> public void BindSlabList() { try { WaitingFrom.ShowWait(""); gc_Slab.DataSource = null; DataTable dt = bllTscSlabMain.Get_KC_List(slabwhCode, txt_Grd.Text.Trim(), txt_Stove.Text.Trim(), txt_Spec.Text.Trim(), "", "").Tables[0]; this.gc_Slab.DataSource = dt; SetGridViewRowNum.SetRowNum(gv_Slab); WaitingFrom.CloseWait(); } catch (Exception ex) { } }
private void BindList() { try { WaitingFrom.ShowWait(""); string type = imgcbo_Type.EditValue?.ToString(); DataTable dt = bllCharacter.GetList(txt_name.Text, type).Tables[0]; this.gc_CFXN.DataSource = dt; gv_CFXN.BestFitColumns(); SetGridViewRowNum.SetRowNum(gv_CFXN); WaitingFrom.CloseWait(); } catch { throw; } }
private void btn_query_Click(object sender, EventArgs e) { if (dtp_from.Text.Trim() == "" || dtp_end.Text.Trim() == "") { MessageBox.Show("请输入查询日期!"); return; } string dt1 = Convert.ToDateTime(dtp_from.Text).ToString("yyyy-MM-dd") + " 00:00:00"; string dt2 = Convert.ToDateTime(dtp_end.Text).ToString("yyyy-MM-dd") + " 23:59:59"; WaitingFrom.ShowWait("数据正在加载,请稍候..."); DataTable dt = bll_order.GetXCTJ(dt1, dt2); this.gridControl1.DataSource = dt; this.gridView1.OptionsView.ColumnAutoWidth = false; this.gridView1.OptionsSelection.MultiSelect = true; SetGridViewRowNum.SetRowNum(gridView1); this.gridView1.BestFitColumns(); WaitingFrom.CloseWait(); }