/// <summary> /// DataDic窗体激活事件。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataDic_Activated(object sender, System.EventArgs e) { string sList = ""; int iColCount; SpreadCommon SpreadCommon = new SpreadCommon(); SpreadCommon.Gp_Sp_ColGet(ssWhere, this.Name, GeneralCommon.DD.DataDicType); SpreadCommon.Gp_Sp_ColGet(ssResult, this.Name, GeneralCommon.DD.DataDicType); try { if (!IsSpreadCaller) //Master Control F4 Call { for (iColCount = 0; iColCount <= rControl.Count - 1; iColCount++) { ssWhere.Sheets[0].Cells[0, iColCount].Text = (string)(((Control)rControl[iColCount + 1]).Text); } } else //SpreadSheet F4 Call { FarPoint.Win.Spread.FpSpread ss = (FarPoint.Win.Spread.FpSpread)SpreadObj; for (iColCount = 0; iColCount <= rControl.Count - 1; iColCount++) { ssWhere.Sheets[0].Cells.Get(0, iColCount).Text = ss.ActiveSheet.Cells.Get(ss.ActiveSheet.ActiveRowIndex, System.Convert.ToInt32(rControl[iColCount + 1])).Text; } } this.BackColor = GeneralCommon.VbFormBKColor; } catch (Exception) { //GeneralCommon.Gp_MsgBoxDisplay(ex.Message) } }
public void Form_Load(object sender, System.EventArgs e) { base.sSvrPgmPkgName = "CGC2070NC"; Form_Define(); CBO_SHIFT.Items.Add("1"); CBO_SHIFT.Items.Add("2"); CBO_SHIFT.Items.Add("3"); CBO_GROUP.Items.Add("A"); CBO_GROUP.Items.Add("B"); CBO_GROUP.Items.Add("C"); CBO_GROUP.Items.Add("D"); CBO_NUM.Items.Add("2"); CBO_NUM.Items.Add("4"); CBO_NUM.Items.Add("6"); CBO_NUM.Items.Add("8"); CBO_GAS_FL.Items.Add(""); CBO_GAS_FL.Items.Add("Y 有火切指示"); CBO_GAS_FL.Items.Add("N 无火切指示"); SpreadCommon.Gp_Sp_ColHidden(ss1, SS1_SMP_YN, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SS1_OFFLINE_DATE, true); ss1.ActiveSheet.FrozenColumnCount = 3; }
private void btn_cancel_Click(object sender, EventArgs e) { int iRowidx; btn_move.Enabled = true; if (ss1.ActiveSheet.SelectionCount > 0) { for (int iRow = ss1.ActiveSheet.RowCount - 1; iRow >= 0; iRow--) { if (ss1.ActiveSheet.RowHeader.Rows[iRow].Label == "删除")//钢板号相同且行头是增加才可以取消 { iRowidx = iRow + 1; ss1.ActiveSheet.RowHeader.Rows[iRow].Label = iRowidx.ToString(); //行头恢复 SpreadCommon.Gp_Sp_RowColor(ss1, iRow, Color.Black, Color.White); //背景色恢复 } } } if (ss2.ActiveSheet.RowCount > 0) { for (int iRow = ss2.ActiveSheet.RowCount - 1; iRow >= 0; iRow--) { if (ss2.ActiveSheet.RowHeader.Rows[iRow].Label == "修改") //钢板号相同且行头是增加才可以取消 { ss2.ActiveSheet.Cells[iRow, iss2_plate_no].Text = ""; //清空钢板号 ss2.ActiveSheet.Cells[iRow, iss2_upd_emp].Text = ""; //清空指定垛位人员 iRowidx = iRow + 1; ss2.ActiveSheet.RowHeader.Rows[iRow].Label = iRowidx.ToString(); //行头恢复 SpreadCommon.Gp_Sp_RowColor(ss2, iRow, Color.Black, Color.White); //背景色恢复 } } sxt_select_cnt.NumValue = 0; } }
private void ss1_Clk(int col, int row) { if (ss1.ActiveSheet.RowCount <= 0) { return; } if ((col == SS1_SMP_YN | col == SS1_LINE1 | col == SS1_LINE2 | col == SS1_LINE3 | col == SS1_LINE4)) { //ss1.EditMode = true; //if (ss1.ActiveSheet.Cells[row, col].Text == "False") //{ // ss1.ActiveSheet.Cells[row, col].Value = 1; //} else { // ss1.ActiveSheet.Cells[row, col].Value = 0; //} if (ss1.ActiveSheet.Cells[row, col].Text == "True") { if (col == SS1_LINE1) { ss1.ActiveSheet.Cells[row, SS1_LINE2].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE3].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE4].Value = 0; ss1.ActiveSheet.Cells[row, SS1_OFFLINE_DATE].Text = ""; } else if (col == SS1_LINE2) { ss1.ActiveSheet.Cells[row, SS1_LINE1].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE3].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE4].Value = 0; ss1.ActiveSheet.Cells[row, SS1_OFFLINE_DATE].Text = ""; } else if (col == SS1_LINE3) { ss1.ActiveSheet.Cells[row, SS1_LINE1].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE2].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE4].Value = 0; } else if (col == SS1_LINE4) { ss1.ActiveSheet.Cells[row, SS1_LINE1].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE2].Value = 0; ss1.ActiveSheet.Cells[row, SS1_LINE3].Value = 0; } } else { ss1.ActiveSheet.RowHeader.Cells[row, 0].Text = ""; } ss1.ActiveSheet.Cells[row, SS1_USERID].Text = GeneralCommon.sUserID; SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, row, row, Color.Black, SSP1.BackColor); //txt_tmpseq.Text = ss1.ActiveSheet.ActiveRowIndex; } }
public override void Form_Ref() { string SMESG; int lRow; string sSmp_color; string sCnt_color; p_Ref(1, 1, true, true); for (lRow = 1; lRow <= ss1.ActiveSheet.RowCount; lRow++) { // 一坯多订单,字体显示蓝色 2011-08-18 by LiQian if (ss1.ActiveSheet.Cells[lRow - 1, SS1_ORD_CNT].Text != "") { if (Convert.ToInt32(ss1.ActiveSheet.Cells[lRow - 1, SS1_ORD_CNT].Text) > 1) { sCnt_color = "#0000FF"; } else { sCnt_color = "#000000"; } SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, ColorTranslator.FromHtml(sCnt_color), Color.White); } if (ss1.ActiveSheet.Cells[lRow - 1, SS1_PRC_LINE].Text != "X") { SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, Color.Black, SSP2.BackColor); } if (ss1.ActiveSheet.Cells[lRow - 1, SS1_PLAN_SMP].Text != "") { if (ss1.ActiveSheet.Cells[lRow - 1, SS1_PLAN_SMP].Text == "Y") { sSmp_color = "#FF0000"; } else { sSmp_color = "#000000"; } SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, ColorTranslator.FromHtml(sSmp_color), SSP3.BackColor); } //紧急订单绿色标记 2012-08-16 by LiQian if (ss1.ActiveSheet.Cells[lRow - 1, SS1_URGNT_FL].Text == "Y") { SpreadCommon.Gp_Sp_BlockColor(ss1, SS1_MPLATE_NO, SS1_MPLATE_NO, lRow - 1, lRow - 1, Color.Green, Color.White); SpreadCommon.Gp_Sp_BlockColor(ss1, SS1_TRNS_CMPY_CD, SS1_TRNS_CMPY_CD, lRow - 1, lRow - 1, Color.Green, Color.White); SpreadCommon.Gp_Sp_BlockColor(ss1, SS1_URGNT_FL, SS1_URGNT_FL, lRow - 1, lRow - 1, Color.Green, Color.White); } if (ss1.ActiveSheet.Cells[lRow - 1, SS1_IMP_CONT].Text == "Y") { SpreadCommon.Gp_Sp_BlockColor(ss1, SS1_MPLATE_NO, SS1_MPLATE_NO, lRow - 1, lRow - 1, SSP4.BackColor, Color.White); SpreadCommon.Gp_Sp_BlockColor(ss1, SS1_IMP_CONT, SS1_IMP_CONT, lRow - 1, lRow - 1, SSP4.BackColor, Color.White); } } }
private void CGT2100C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "CGT2100NC"; Form_Define(); this.OPT_PLATE.Checked = true; this.TXT_SP_CD.Text = "P"; SpreadCommon.Gp_Sp_ColHidden(ss1, 12, true); }
private void AGC2432C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "AGC2432NC"; Form_Define(); // base.sAuthority = "1111"; txt_plt.Text = "C3"; this.dtp_prod_fr.RawDate = curDate;//取当前时间 this.dtp_prod_to.RawDate = curDate; txt_smp_fl.Checked = false; txt_check.Checked = false; subButtonHide();//设置画面形式。 txt_smp_sent_no.Text = ""; TXT_CUT_PLT.Text = ""; PLT_NAME.Text = "中板厂"; SpreadCommon.Gp_Sp_ColHidden(ss1, 54, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 55, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 56, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 57, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 58, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 59, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 60, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 61, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 62, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 63, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 64, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 65, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 66, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 67, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 68, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 69, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 70, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 71, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 72, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 73, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 74, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 75, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 76, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 77, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 78, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 79, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 80, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 81, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 82, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 83, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 84, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 85, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 86, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 87, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 88, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 89, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 90, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 91, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 92, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 93, true); }
//const int SPD_PLAN_PROD_WGT = 33, #region 界面初始化 protected override void p_SubFormInit() { int iheadrow; int imcseq; int iscseq; p_McIni(Mc1, false); imcseq = 1; p_SetMc(TXT_MAT_NO, "P", "", "", "", imcseq, ""); p_SetMc(TXT_SEQ, "P", "", "", "", imcseq, ""); p_SetMc(txt_line, "P", "", "", "", imcseq, ""); p_SetMc(SDT_PROD_DATE_FROM, "P", "", "", "", imcseq, ""); p_SetMc(SDT_PROD_DATE_TO, "P", "", "", "", imcseq, ""); p_SetMc(CBO_SHIFT, "P", "", "", "", imcseq, ""); p_SetMc(CBO_GROUP, "P", "", "", "", imcseq, ""); p_SetMc(txt_m_r, "P", "", "", "", imcseq, ""); p_SetMc(txt_onoff, "P", "", "", "", imcseq, ""); p_SetMc(txt_prc, "P", "", "", "", imcseq, ""); p_ScIni(ss1, Sc1, 0, false, true); iheadrow = 1; iscseq = 1; p_SetSc("物料号", "E", "14", "PI", "", "", "", iscseq, iheadrow, "L"); //0 p_SetSc("发生时间", "DT", "", "PI", "", "", "", iscseq, iheadrow, "M"); //1 p_SetSc("轧批号", "E", "14", "L", "", "", "", iscseq, iheadrow, "R"); //2 p_SetSc("分段号", "E", "10", "L", "", "", "", iscseq, iheadrow, "M"); //3 p_SetSc("厚度", "E", "10", "L", "", "", "", iscseq, iheadrow, "R"); //4 p_SetSc("宽度", "E", "10", "L", "", "", "", iscseq, iheadrow, "R"); //5 p_SetSc("长度", "E", "10", "L", "", "", "", iscseq, iheadrow, "R"); //6 p_SetSc("标准号", "E", "30", "L", "", "", "", iscseq, iheadrow, "L"); //7 p_SetSc("分线时间", "DT", "", "", "", "", "", iscseq, iheadrow, "M"); //8 p_SetSc("工序", "E", "20", "IL", "", "", "", iscseq, iheadrow, "L"); //9 p_SetSc("时间", "DT", "", "IL", "", "", "", iscseq, iheadrow, "M"); //10 p_SetSc("原因", "E", "20", "I", "", "", "", iscseq, iheadrow, "L"); //11 p_SetSc("位置", "E", "10", "I", "", "", "", iscseq, iheadrow, "L"); //12 p_SetSc("人员", "E", "10", "IL", "", "", "", iscseq, iheadrow, "L"); //13 p_SetSc("工序", "E", "20", "IL", "", "", "", iscseq, iheadrow, "L"); //14 p_SetSc("时间", "DT", "", "IL", "", "", "", iscseq, iheadrow, "M"); //15 p_SetSc("原因", "E", "20", "IL", "", "", "", iscseq, iheadrow, "L"); //16 p_SetSc("人员", "E", "10", "IL", "", "", "", iscseq, iheadrow, "L"); //17 p_SetSc("上下线标志", "E", "10", "IL", "", "", "", iscseq, iheadrow, "M"); //18 iheadrow = 0; p_spanSpread("规格", 4, 6, iscseq, iheadrow, 1); p_spanSpread("物料下线", 9, 13, iscseq, iheadrow, 1); p_spanSpread("物料上线", 14, 17, iscseq, iheadrow, 1); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_OCCR_TIME, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_LINE_DATE, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_OFF_REASON, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_OFF_LOC, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_ON_REASON, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_ONOFF_CD, true); }
private void AGC3020C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "AGC3020NC"; Form_Define(); CBO_KND.Text = "1 钢板退判"; TXT_KND.Text = "1"; CBO_PLT.Text = "C3"; SpreadCommon.Gp_Sp_ColHidden(ss1, 0, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 7, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 20, true); }
private void move_mark(int startrow) { for (int icnt = 0; icnt < (int)sxt_select_cnt.NumValue; icnt++) { ss1.ActiveSheet.RowHeader.Rows[ss1.ActiveSheet.ActiveRowIndex - icnt].Label = "删除"; ss2.ActiveSheet.RowHeader.Rows[startrow - icnt].Label = "修改"; ss2.ActiveSheet.Cells[startrow - icnt, iss2_plate_no].Text = ss1.ActiveSheet.Cells[ss1.ActiveSheet.ActiveRowIndex - icnt, iss1_plate_no].Text; SpreadCommon.Gp_Sp_RowColor(ss1, ss1.ActiveSheet.ActiveRowIndex - icnt, Color.Black, Color.LightPink); //选定行着色 SpreadCommon.Gp_Sp_RowColor(ss2, startrow - icnt, Color.Black, Color.LightPink); //选定行着色 } }
private void CBO_KND_SelectedIndexChanged(object sender, EventArgs e) { SpreadCommon.Gf_Sp_Cls(Sc1); TXT_KND.Text = CBO_KND.Text.Substring(0, 1); if (TXT_KND.Text == "1") { Ulabel5.Text = "退判时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "退判原因"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text = "退判时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text = "删除时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text = "退判人员"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text = "删除人员"; SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true); } else if (TXT_KND.Text == "4") { Ulabel5.Text = "钢板删除时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "申请原因"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text = "申请时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text = "删除时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text = "申请人员"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text = "删除人员"; SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, false); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, false); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, false); } else if (TXT_KND.Text == "6") { Ulabel5.Text = "退入库时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "退入库原因"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text = "退入库时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text = "删除时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text = "退入库人员"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text = "删除人员"; SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true); } else if (TXT_KND.Text == "8") { Ulabel5.Text = "强制排产时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_REASON).Text = "强制排产原因"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_DATE).Text = "强制排产时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_CL_DATE).Text = "删除时间"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_SQ_ID).Text = "强制排产人员"; ss1.Sheets[0].ColumnHeader.Cells.Get(0, SPD_USER_ID).Text = "删除人员"; SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_1, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CL_DATE, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_USER_ID, true); } }
public override void Spread_Can() { int ss1Row; int ss2Row; int iCnt; int iCnt1; string iPlate_no; //ss2.Col = 0; //ss2.ROW = ss2.ActiveSheet.ActiveRowIndex; if (ss2.ActiveSheet.RowHeader.Cells[ss2.ActiveSheet.ActiveRowIndex, 0].Text == "增加") { for (ss2Row = ss2.ActiveSheet.ActiveRowIndex; ss2Row >= 0; ss2Row += -1) { //ss2.Col = 2; //ss2.ROW = ss2Row; if (ss2.ActiveSheet.Cells[ss2Row, 1].Text.Length == 14) { iPlate_no = ss2.ActiveSheet.Cells[ss2Row, 1].Text; ss2.ActiveSheet.Cells[ss2Row, 1].Text = ""; //ss2.Col = 0; ss2.ActiveSheet.RowHeader.Cells[ss2Row, 0].Text = ""; for (ss1Row = 1; ss1Row <= ss1.ActiveSheet.RowCount; ss1Row++) { //ss1.ROW = ss1Row; //ss1.Col = 0; if (ss1.ActiveSheet.RowHeader.Cells[ss1Row - 1, 0].Text == "增加") { //ss1.Col = 1; if (ss1.ActiveSheet.Cells[ss1Row - 1, 0].Text == iPlate_no) { //ss1.Col = 0; ss1.ActiveSheet.RowHeader.Cells[ss1Row - 1, 0].Text = ""; SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, ss1Row - 1, ss1Row - 1, Color.Black, ColorTranslator.FromHtml("#FFFFFF")); //ss1.Col = 7; TXT_CNT.Text = (Convert.ToInt32(TXT_CNT.Text) - 1).ToString(); TXT_WGT.Text = (Convert.ToDouble(TXT_WGT.Text) - Convert.ToDouble(ss1.ActiveSheet.Cells[ss1Row - 1, 6].Text)).ToString(); if (TXT_CNT.Text == "0") { TXT_CNT.Text = ""; TXT_WGT.Text = ""; } } } } } } } }
// 重写导出方法 public override void Spread_Exc() { // 选择明细导出 if (this.chk_detail.Checked) { SpreadCommon.Gp_Sp_Excel(ss2); } else { SpreadCommon.Gp_Sp_Excel(ss1); } }
private void CGE2021C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "CGE2021NC"; Form_Define(); SpreadCommon.Gp_Sp_ColHidden(ss2, 2, true); TXT_CNT.Text = ""; TXT_WGT.Text = ""; text_cur_inv_code.Text = "ZB"; text_cur_inv.Text = "中板"; CBO_PROD_CD.SelectedIndex = 0; SDT_PROD_DATE_GotFocus(); }
private void CKG2070C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "CKG2080NC"; Form_Define(); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_ROLL_MANA_NO, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_ROLL_SLAB_SEQ, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_ACTUAL_ROLLING_LEN, true); //SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_SEQ_NO, true); //SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_SLAB_EDT_SEQ, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_FL1, true); SpreadCommon.Gp_Sp_ColHidden(ss1, SPD_CHOSE_FL, true); }
/// <summary> /// 关闭DataDic窗体前,保存DataDic窗体上两个spread的各列的宽度。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataDic_Closing(object sender, System.ComponentModel.CancelEventArgs e) { //20091028,hux,Add //增加窗口位置的判断,窗口不在显示器内不记录位置 if (this.Top > 0 && this.Left > 0) { GeneralCommon.Gp_FormLoc_Set(this, "ETC"); } SpreadCommon SpreadCommon = new SpreadCommon(); SpreadCommon.Gp_Sp_ColSet(ssWhere, this.Name, GeneralCommon.DD.DataDicType); SpreadCommon.Gp_Sp_ColSet(ssResult, this.Name, GeneralCommon.DD.DataDicType); }
private void AGC2440C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "AGC2440NC"; Form_Define(); if (opt_HTM_PLT0.Checked) { SpreadCommon.Gp_Sp_ColHidden(ss1, 1, true); } txt_HTM_PLT.Text = "1"; opt_HTM_PLT1.Checked = true; txt_HEAT.Text = "0"; txt_DH_FL.Checked = false; }
public override void Form_Ref() { string SMESG; int iRow; string sCurDate; string sDel_To_Date; string sURGNT; sCurDate = DateTime.Now.ToString("yyyyMM"); if (!opt_LineFlag0.Checked & !opt_LineFlag2.Checked) { GeneralCommon.Gp_MsgBoxDisplay("请选择精整等待或精整保留...!", "I", ""); return; } p_Ref(1, 1, true, true); //无数据则退出 if (ss1.ActiveSheet.RowCount <= 0) { return; } //超交货期用红色显示 add by liqian 2012-07-23 { for (iRow = 1; iRow <= ss1.ActiveSheet.RowCount; iRow++) { sDel_To_Date = substr(ss1.ActiveSheet.Cells[iRow - 1, SS1_DEL_DATE_TO].Text, 0, 6); if (sDel_To_Date != "" && convertX(sDel_To_Date) < convertX(sCurDate)) { SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Red, Color.White); } //是否紧急订单警示 sURGNT = ss1.ActiveSheet.Cells[iRow - 1, SPD_URGNT_FL].Text; if (sURGNT == "Y") { SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, iRow - 1, iRow - 1, Color.Green, Color.White); } } Text1_PLATE_NO.Text = ss1.ActiveSheet.Cells[0, SS1_PLATE_NO].Text; txt_REMARKS.Text = ""; p_Ref(2, 0, true, false); } }
private void ss1_CellClick(object sender, CellClickEventArgs e) { int lRow; string sBlockSeq; string sSeq; if (ss1.ActiveSheet.RowCount <= 0) { return; } TXT_SLAB_NO.Text = ss1.ActiveSheet.Cells[e.Row, 0].Text; SpreadCommon.Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, 0, ss1.ActiveSheet.RowCount - 1, Color.Black, Color.White); Gp_Sp_BlockColor(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, e.Row, e.Row, Color.Black, SSP1.BackColor); if (OPT_FP_SLAB_DES.Checked) { p_Ref(2, 2, false, false); } else if (OPT_FP_SLAB_DES1.Checked) { p_Ref(4, 4, false, false); } else { p_Ref(6, 6, false, false); } TXT_SLAB_NO.Text = ""; for (lRow = 1; lRow <= ss2.ActiveSheet.RowCount; lRow++) { sBlockSeq = ss2.ActiveSheet.Cells[lRow - 1, SS2_BLOCK_SEQ].Text; sSeq = ss2.ActiveSheet.Cells[lRow - 1, SS2_SEQ].Text; if (sBlockSeq + sSeq == "0000") { Gp_Sp_BlockColor(ss2, 0, ss2.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, Color.Black, SSP1.BackColor); ss2.ActiveSheet.Cells[lRow - 1, SS2_PROD_CD].Text = "轧件"; } else if (sSeq == "00") { Gp_Sp_BlockColor(ss2, 0, ss2.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, Color.Black, SSP2.BackColor); ss2.ActiveSheet.Cells[lRow - 1, SS2_PROD_CD].Text = "母板" + sBlockSeq; } else { Gp_Sp_BlockColor(ss2, 0, ss2.ActiveSheet.ColumnCount - 1, lRow - 1, lRow - 1, Color.Black, SSP3.BackColor); ss2.ActiveSheet.Cells[lRow - 1, SS2_PROD_CD].Text = "钢板"; } } }
//const int SPD_PLAN_PROD_WGT = 33, #region 界面初始化 protected override void p_SubFormInit() { int iheadrow; int imcseq; int iscseq; p_McIni(Mc1, false); imcseq = 1; p_SetMc("开始时间", sdt_in_plt_date, "PN", "", "", "", "", imcseq); p_SetMc("结束时间", sdt_out_plt_date, "PN", "", "", "", "", imcseq); p_SetMc(txt_plt, "P", "", "", "", imcseq, ""); p_SetMc(txt_act_stlgrd, "P", "", "", "", imcseq, ""); p_SetMc(CBO_SHIFT, "P", "", "", "", imcseq, ""); p_ScIni(ss1, Sc1, 0, true, true); iheadrow = 1; iscseq = 1; p_SetSc("母板坯号", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //0 p_SetSc("原板坯号", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //1 p_SetSc("厚度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //2 p_SetSc("宽度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //3 p_SetSc("长度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //4 p_SetSc("母板坯重量", "N", "8,3", "L", "", "", "", iscseq, iheadrow, "R"); //5 p_SetSc("钢种", "E", "60", "L", "", "", "", iscseq, iheadrow, "L"); //6 p_SetSc("板坯号", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //7 p_SetSc("厚度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //8 p_SetSc("宽度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //9 p_SetSc("长度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //10 p_SetSc("板坯重量", "N", "8,3", "L", "", "", "", iscseq, iheadrow, "R"); //11 p_SetSc("指示日期", "DT", "", "L", "", "", "", iscseq, iheadrow, "M"); //12 p_SetSc("板坯切割时间", "DT", "", "L", "", "", "", iscseq, iheadrow, "M"); //13 p_SetSc("班别", "E", "10", "L", "", "", "", iscseq, iheadrow, "M"); //14 p_SetSc("订单号", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //15 p_SetSc("定尺类别", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //16 p_SetSc("厚度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //17 p_SetSc("宽度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //18 p_SetSc("长度", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //19 p_SetSc("垛位号", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //20 iheadrow = 0; p_spanSpread("母板坯尺寸", 2, 4, iscseq, iheadrow, 1); p_spanSpread("板坯尺寸", 8, 10, iscseq, iheadrow, 1); p_spanSpread("订单尺寸", 17, 19, iscseq, iheadrow, 1); SpreadCommon.Gp_Sp_ColHidden(ss1, 1, true); //SpreadCommon.Gp_Sp_ColHidden(ss1, 17, true); }
private void CGE2020C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "CGE2020NC"; Form_Define(); SpreadCommon.Gp_Sp_ColHidden(ss2, 2, true); TXT_CNT.Text = ""; TXT_WGT.Text = ""; CBO_CUR_INV.Text = "ZB"; text_cur_inv.Text = "中板"; SDT_PROD_DATE_FROM.RawDate = Gf_DTSet("D", ""); SDT_PROD_DATE_TO.RawDate = Gf_DTSet("D", ""); opt_LineFlag0.Checked = true; }
//const int SPD_PLAN_PROD_WGT = 33, #region 界面初始化 protected override void p_SubFormInit() { int iheadrow; int imcseq; int iscseq; p_McIni(Mc1, false); imcseq = 1; p_SetMc("产品代码", txt_prod_cd, "P", "", "", "", "", imcseq); p_SetMc("堆放仓库", txt_cur_inv, "P", "", "", "", "", imcseq); p_SetMc("物料编号", txt_mat_no, "P", "", "", "", "", imcseq); p_SetMc("垛位号", txt_location, "P", "", "", "", "", imcseq); p_SetMc("临时垛位号", chk_nolocation, "P", "", "", "", "", imcseq); p_SetMc("热处理车间", chk_htm, "P", "", "", "", "", imcseq); p_ScIni(ss1, Sc1, 16, true, true); iheadrow = 1; iscseq = 1; p_SetSc("产品", "E", "60", "AIL", "", "", "", iscseq, iheadrow, "L"); //0 p_SetSc("库代码", "E", "60", "AI", "", "", "", iscseq, iheadrow, "L"); //1 p_SetSc("物料编号", "E", "60", "IL", "", "", "", iscseq, iheadrow, "L"); //2 p_SetSc("垛位号", "E", "7", "L", "", "", "", iscseq, iheadrow, "M"); //3 p_SetSc("垛层", "N", "4", "L", "", "", "", iscseq, iheadrow, "R"); //4 p_SetSc("列", "E", "2", "L", "", "", "", iscseq, iheadrow, "M"); //5 p_SetSc("垛位号", "E", "7", "NI", "", "", "", iscseq, iheadrow, "M"); //6 p_SetSc("垛层", "N", "4", "NI", "", "", "", iscseq, iheadrow, "R"); //7 p_SetSc("列", "E", "2", "NI", "", "", "", iscseq, iheadrow, "M"); //8 p_SetSc("钢种", "E", "60", "L", "", "", "", iscseq, iheadrow, "L"); //9 p_SetSc("钢种说明", "E", "30", "L", "", "", "", iscseq, iheadrow, "L"); //10 p_SetSc("厚度", "N", "8,2", "L", "", "", "", iscseq, iheadrow, "R"); //11 p_SetSc("宽度", "N", "8,2", "L", "", "", "", iscseq, iheadrow, "R"); //12 p_SetSc("长度", "N", "8,2", "L", "", "", "", iscseq, iheadrow, "R"); //13 p_SetSc("重量", "N", "15,3", "L", "", "", "", iscseq, iheadrow, "R"); //14 p_SetSc("生产工厂", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //15 p_SetSc("作业人", "E", "20", "IL", "", "", "", iscseq, iheadrow, "M"); //16 p_SetSc("作业人员", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //17 p_SetSc("铸机号", "E", "20", "L", "", "", "", iscseq, iheadrow, "M"); //18 iheadrow = 0; p_spanSpread("当垛位号", 3, 5, iscseq, iheadrow, 1); p_spanSpread("转垛位号", 6, 8, iscseq, iheadrow, 1); SpreadCommon.Gp_Sp_ColHidden(ss1, 16, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 17, true); }
public override void Form_Ref() { int ForCnt; int ChkVal; firstFL = ""; if (txt_new_slab_no.Text.Trim().Length < 8) { GeneralCommon.Gp_MsgBoxDisplay("确认Heat_no 不够8位", "I", ""); return; } if (p_Ref(1, 0, true, true)) { //firstFL = "Y"; comm_slab.Enabled = false; } CHEMISTRY_DISP(); if (p_Ref(1, 1, true, true)) { firstFL = "Y"; comm_slab.Enabled = false; } ChkVal = 0; for (ForCnt = 1; ForCnt <= ss1.ActiveSheet.RowCount; ForCnt++) { if (ss1.ActiveSheet.Cells[ForCnt - 1, 7].Value == "使用完") { ChkVal = ChkVal + 1; } } if (ChkVal > 0) { SpreadCommon.Gp_Sp_BlockLock(ss1, 0, ss1.ActiveSheet.ColumnCount - 1, 0, ss1.ActiveSheet.RowCount - 1, true); } if (ss1.ActiveSheet.RowCount > 0) { txt_slabcnt.NumValue = ss1.ActiveSheet.RowCount; } }
private void Spread_ColSort_Load(object sender, System.EventArgs e) { SpreadCommon SpreadCommon = new SpreadCommon(); GeneralCommon.Gp_FormCenter(this); SpreadCommon.Gp_Sp_ColSort(Active_Spread, cbo_first, ref cbo_second, ref cbo_third); cbo_second.Enabled = false; cbo_third.Enabled = false; opt_second_a.Enabled = false; opt_second_d.Enabled = false; opt_third_a.Enabled = false; opt_third_d.Enabled = false; this.BackColor = GeneralCommon.VbFormBKColor; }
private void ss3_Click(int Col, int ROW) { int P; int iRow; int iCol; if (ss2.ActiveSheet.RowCount <= 0) { TXT_MPLATE_NO.Text = ""; SpreadCommon.Gf_Sp_Cls(Sc3); return; } SDB_SLAB_EDT_SEQ.Text = ss2.ActiveSheet.Cells[ROW, SS3_SLAB_EDT_SEQ].Text; SDB_MPLATE_EDT_SEQ.Text = ss2.ActiveSheet.Cells[ROW, SS3_MPLATE_EDT_SEQ].Text; p_Ref(3, 3, false, false); }
public override void Spread_Exc() { if (0 == tabControl1.SelectedIndex) { if (ss1_Sheet1.RowCount <= 0) { return; } SpreadCommon.Gp_Sp_Excel(ss1); } if (1 == tabControl1.SelectedIndex) { if (ss2_Sheet1.RowCount <= 0) { return; } SpreadCommon.Gp_Sp_Excel(ss2); } }
private void ssResult2Ctl() { if (ssResult.Rows.Count > 1) { if (GeneralCommon.DD_New.sWitch == "MS" || GeneralCommon.DD_New.sWitch == "CUS") { /* 控件F4涉及到两个信息 CD/CD_NAME两个信息分别填写在TextBox的两个部分. */ /* rControl[1] 保存CD, rControl[2] 保存CD_NAME. * */ int i = 0; string CtlAtt = ""; for (i = 0; i < GeneralCommon.DD_New.sContrl.Count; i++) { CtlAtt = GeneralCommon.DD_New.sCtlAttr[i].ToString().ToUpper(); if (CtlAtt.Contains("I")) { Control Ctr = (Control)GeneralCommon.DD_New.sContrl[i]; MasterCommon.SetControlValue(Ctr, ssResult[ssResult.RowSel, Convert.ToInt32(GeneralCommon.DD_New.siCol[i])].ToString()); } } } else { FlexGrid_User oFlexGrid = (FlexGrid_User)GeneralCommon.DD_New.sPname; /* 只将代码赋值给原来的F4列上. */ // oFlexGrid[oFlexGrid.RowSel, oFlexGrid.ColSel] = ssResult[ssResult.RowSel, 1].ToString(); int i = 0; string CtlAtt = ""; for (i = 0; i < GeneralCommon.DD_New.sContrl.Count; i++) { CtlAtt = GeneralCommon.DD_New.sCtlAttr[i].ToString().ToUpper(); if (CtlAtt.Contains("I")) { // Control Ctr = (Control)GeneralCommon.DD_New.sContrl[i]; SpreadCommon.SetCellValue(oFlexGrid, oFlexGrid.RowSel, ((C1.Win.C1FlexGrid.Column)GeneralCommon.DD_New.sContrl[i]).Index, ssResult[ssResult.RowSel, Convert.ToInt32(GeneralCommon.DD_New.siCol[i])].ToString()); } } } } }
protected override void p_SubFormInit() { int imcseq; p_McIni(Mc1, false); imcseq = 1; p_SetMc("工厂", CBO_PLT, "P", "", "", "", "", imcseq);//1 p_SetMc("工序", CBO_PRC, "P", "", "", "", "", imcseq); p_SetMc("发生时间", TXT_OCCR_TIME, "P", "", "", "", "", imcseq); p_SetMc("发生时间", TXT_OCCR_TIME_TO, "P", "", "", "", "", imcseq); p_SetMc("停机代码", TXT_DEL_RES_CD, "P", "", "", "", "", imcseq); p_SetMc("班次", CBO_SHIFT, "P", "", "", "", "", imcseq); p_SetMc("班别", CBO_GROUP, "P", "", "", "", "", imcseq); int iheadrow; int iscseq; p_ScIni(ss1, Sc1, 0, false, true); iheadrow = 0; iscseq = 1; p_SetSc("工厂代码", "E", "2", "PNI", "", "", "", iscseq, iheadrow, "L"); //0 p_SetSc("工序代码", "E", "2", "PNI", "", "", "", iscseq, iheadrow, "L"); //1 p_SetSc("机号", "E", "60", "PNI", "", "", "", iscseq, iheadrow, "L"); //2 p_SetSc("发生时间", "D", "", "PI", "", "", "", iscseq, iheadrow, "M"); //3 p_SetSc("停机代码", "E", "5", "PNI", "", "", "", iscseq, iheadrow, "L"); //4 p_SetSc("停机原因说明", "E", "80", "L", "", "", "", iscseq, iheadrow, "L"); //5 p_SetSc("停机开始时间", "E", "", "PNI", "", "", "", iscseq, iheadrow, "M"); //6 p_SetSc("停机结束时间", "E", "", "I", "", "", "", iscseq, iheadrow, "M"); //7 p_SetSc("影响时间(Min)", "N", "9", "I", "", "", "", iscseq, iheadrow, "R"); //8 p_SetSc("班次", "E", "60", "L", "", "", "", iscseq, iheadrow, "M"); //9 p_SetSc("班别", "E", "2", "L", "", "", "", iscseq, iheadrow, "M"); //10 p_SetSc("作业人员", "E", "7", "I", "", "", "", iscseq, iheadrow, "L"); //11 p_SetSc("故障处理人员", "E", "60", "I", "", "", "", iscseq, iheadrow, "L"); //12 p_SetSc("责任单位", "E", "200", "I", "", "", "", iscseq, iheadrow, "L"); //13 p_SetSc("备注", "E", "200", "I", "", "", "", iscseq, iheadrow, "L"); //14 SpreadCommon.Gp_Sp_ColHidden(ss1, 0, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 12, true); }
//重置ss1的初始化状态 public void resetSpreadColumnHeaderName() { int iheadrow = 0; int iscseq = 1; p_SetSc("板坯重量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //0 p_SetSc("合格量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //1 p_SetSc("理论计算合格量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //2 p_SetSc("协议量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //3 p_SetSc("改判量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //4 p_SetSc("修磨量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //5 p_SetSc("待判量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //6 p_SetSc("废品量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //7 p_SetSc("不合格量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //8 p_SetSc("探伤量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //9 p_SetSc("合格率(%)", "N", "8,1", "L", "", "", "", iscseq, iheadrow); //10 p_SetSc("成材率(%)", "N", "8,3", "L", "", "", "", iscseq, iheadrow); //11 p_SetSc("下料成材率(%)", "N", "8,3", "L", "", "", "", iscseq, iheadrow); //12 p_SetSc("剪切重量", "N", "12,3", "L", "", "", "", iscseq, iheadrow); //13 SpreadCommon.Gp_Sp_ColHidden(ss1, 12, true); }
private void CKG2060C_Load(object sender, EventArgs e) { base.sSvrPgmPkgName = "CKG2060NC"; Form_Define(); SpreadCommon.Gp_Sp_ColHidden(ss1, 23, true); SpreadCommon.Gp_Sp_ColHidden(ss1, 24, true); txt_DATE.RawDate = DateTime.Now.AddDays(-1).ToString("yyyyMMdd"); CBO_SHIFT.Text = "1"; TXT_USER.Text = GeneralCommon.sUserID; if (GeneralCommon.Gf_Sc_Authority(base.sAuthority, "U")) { Cmd_Edit.Enabled = true; } else { Cmd_Edit.Enabled = false; } setSpread2ColumnAndRow(); setMdiWindowsBar(); ss2.ActiveSheet.GrayAreaBackColor = Color.Gray; }