private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e) { if (e.Button.Equals(nav.cmd_search)) { ArrayList a = new ArrayList(); ArrayList b = new ArrayList(); b.Add("CRD_DT"); a.Add("EMP_ID"); // a.Add("EMP_I1"); a.Add("CRD_NO"); frmSearch1 dlg = new frmSearch1(a, b, vs, nav); dlg.ShowDialog(); return; } string sfile = ""; if (e.Button.Equals(nav.cmd_report)) { f2.Filter = " Text File (*.xls)|*.xls"; if (f2.ShowDialog(this) == DialogResult.OK) { sfile = f2.FileName; } vs.SaveExcel(sfile + ""); } }
private void nav2_TBarClick(object sender, ToolBarButtonClickEventArgs e) { if (e.Button.Equals(nav2.cmd_refresh)) { if (nav2.wh != "") { nav2.ToolBar_Click(e); } else { nav2.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and (VAC_BT is null or VAC_BT=0) "); } return; } if (e.Button.Equals(nav2.cmd_search)) { ArrayList a = new ArrayList(); ArrayList b = new ArrayList(); b.Add("SEQ_DT"); a.Add("EMP_ID"); a.Add("EMP_I1"); a.Add("DEP_ID"); frmSearch1 dlg = new frmSearch1(a, b, vs2, nav2); dlg.and = "and (DEP_ID in " + T_String.DEP_ID(this.Tag) + ") and (VAC_BT is null or VAC_BT=0)"; dlg.ShowDialog(); } nav2.ToolBar_Click(e); }
private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e) { if (e.Button.Equals(nav.cmd_refresh)) { if (txt1.Text != "") { txt_KeyDown((object)txt1, new System.Windows.Forms.KeyEventArgs(Keys.Enter)); } else { if (txt2.Text != "") { txt_KeyDown((object)txt2, new System.Windows.Forms.KeyEventArgs(Keys.Enter)); } else { txt_KeyDown((object)txt1, new System.Windows.Forms.KeyEventArgs(Keys.Enter)); } } return; } /// moi them vao if (e.Button.Equals(nav.cmd_search)) { ArrayList a = new ArrayList(); ArrayList b = new ArrayList(); b.Add("STR_DT"); a.Add("EMP_ID"); a.Add("EMP_I1"); a.Add("DEP_ID"); a.Add("LEA_ID"); frmSearch1 dlg = new frmSearch1(a, b, vs, nav); dlg.and = "and (DEP_ID in " + T_String.DEP_ID(this.Tag) + ")"; dlg.ShowDialog(); } nav.ToolBar_Click(e); }
private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e) { if (e.Button.Equals(nav.cmd_add)) { if (vs1.Row <= 0) { return; } if (vs.Rows[vs.Rows.Count - 1].UserData + "" == "2") { return; } nav.ToolBar_Click(e); vs.Rows[vs.Rows.Count - 1]["EMP_ID"] = vs1.Rows[vs1.Row]["EMP_ID"]; int max = T_String.GetMax("MAX(SEQ_NO)", "FILC09A", "EMP_ID=N'" + vs1.Rows[vs1.Row]["EMP_ID"] + "'"); vs.Rows[vs.Rows.Count - 1]["SEQ_NO"] = max; vs.Rows[vs.Rows.Count - 1]["BLT_NM"] = PublicFunction.A_UserID; vs.Rows[vs.Rows.Count - 1]["MAN_ST"] = vs.Rows[vs.Rows.Count - 1]["MAN_ED"] = vs.Rows[vs.Rows.Count - 1]["BLT_DT"] = T_String.GetDate().ToString("yyyy/MM/dd HH:mm"); return; } if (e.Button.Equals(nav.cmd_save)) { // if(vs1.Row<=0) // return; nav.ToolBar_Click(e); // int max=T_String.GetMax("MAX(SEQ_NO)","FILB06A","EMP_ID=N'"+vs1.Rows[vs1.Row]["EMP_ID"]+"'"); // Func.RecordSet rs=new Func.RecordSet("Select * from FILB06A where EMP_ID=N'"+vs1.Rows[vs1.Row]["EMP_ID"]+"' and SEQ_NO="+(max-1),PublicFunction.C_con); // string sql=""; // if(rs.rows>0) // { // sql="update FILB01A set ACC_NO=N'"+rs.record(0,"ACC_NO")+"'," // +"ACC_NM=N'"+rs.record(0,"ACC_NM")+"'," // +"BNK_NM=N'"+rs.record(0,"BNK_NM")+"' where EMP_ID=N'"+vs1.Rows[vs1.Row]["EMP_ID"]+"'"; // } // else // sql="update FILB01A set ACC_NO=Default,ACC_NM=Default,BNK_NM=Default where EMP_ID=N'"+vs1.Rows[vs1.Row]["EMP_ID"]+"'"; // PublicFunction.SQL_Execute(sql); return; } if (e.Button.Equals(nav.cmd_refresh)) { if (nav.wh != "") { nav.ToolBar_Click(e); } //else //nav.Show_VS("DEP_ID in "+T_String.DEP_ID(this.Tag)); return; } if (e.Button.Equals(nav.cmd_search)) { ArrayList a = new ArrayList(); ArrayList b = new ArrayList(); b.Add("MAN_ST"); b.Add("MAN_ED"); a.Add("EMP_ID"); a.Add("EMP_I1"); a.Add("EMP_NM"); a.Add("POS_ID"); a.Add("DEP_ID"); frmSearch1 dlg = new frmSearch1(a, b, vs, nav); dlg.and = "and (DEP_ID in " + T_String.DEP_ID(this.Tag) + ")"; dlg.ShowDialog(); } nav.ToolBar_Click(e); }