コード例 #1
0
        private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
        {
            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));
                if (txt1.Text != vs.Cols[txt1.Tag + ""].Caption && txt1.Text != "")
                {
                    textBox1_KeyDown(txt1, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                }
                else
                {
                    if (txt2.Text != vs.Cols[txt2.Tag + ""].Caption && txt2.Text != "")
                    {
                        textBox1_KeyDown(txt2, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                    }
                    else
                    {
                        if (txt3.Text != vs.Cols[txt3.Tag + ""].Caption && txt3.Text != "")
                        {
                            textBox1_KeyDown(txt3, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                        }
                        else
                        {
                            if (optAll.Checked == true)
                            {
                                nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' order by a.EMP_ID");
                                //nav.Show_VS("DEP_ID=N'"+Dep.Get_Data("DEP_ID")+"' and YYY_YY=N'"+ dt.Text+"'");
                            }
                            else
                            {
                                if (optWorking.Checked == true)
                                {
                                    nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' and (VAC_BT=0 or VAC_BT is null) order by a.EMP_ID");
                                }
                                else
                                {
                                    nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' and VAC_BT=1 order by a.EMP_ID");
                                }
                            }
//							nav.Show_VS("DEP_ID in "+T_String.DEP_ID(this.Tag) +" and YYY_YY=N'"+dt.Text+"'" );
                        }
                    }
                }

                for (int i = 1; i < vs.Rows.Count; i++)
                {
//					if(vs.Rows[i]["VAC_BT"]+""=="True")
//					{
//						for(int c=1;c<vs.Cols.Count;c++)
//							vs.SetCellStyle(i,c, vs.Styles["VAC_BT"]);
//					}
                    CAL(i);
                }
                return;
            }
            nav.ToolBar_Click(e);
        }
コード例 #2
0
ファイル: frmTaSea.cs プロジェクト: trunglu/trungvui
        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);
        }
コード例 #3
0
        private void txt_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string sql;
                //				string f=((TextBox)sender).Tag+"";
                //				if(f=="EMP_ID" || f=="EMP_I1")
                //					f="a."+f;
                //				if(((TextBox)sender).Text+""!="")
                //
                //					sql=f+" like N'%"+((TextBox)sender).Text+"%'";
                //				else
                //					sql="1=1";
                if (txt1.Text + "" != "")
                {
                    sql = " a.EMP_ID like N'%" + txt1.Text + "%'";
                }
                else if (txt2.Text + "" != "")
                {
                    sql = " a.EMP_I1 like N'%" + txt2.Text + "%'";
                }
                else
                {
                    sql = " 1=1";
                }
                string dk = Dep.Get_Data("DEP_ID");

                if (dk + "" != "")
                {
                    sql = sql + " and b.DEP_ID=N'" + dk + "'";
                }
                else
                {
                    sql = sql + " and b.DEP_ID in " + T_String.DEP_ID(this.Tag) + " ";
                }

                if (ck.Checked)
                {
                    sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and "
                          + "(MEAL_DT Between '" + ((DateTime)dt1.Value).ToString("yyyy/MM/dd") + "' and '"
                          + ((DateTime)dt2.Value).ToString("yyyy/MM/dd") + "') "
                          + " and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                          " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
                }
                else
                {
                    sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                          " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
                }


                nav.Show_VS(sql);
                Set_w();
            }
        }
コード例 #4
0
ファイル: frmTaSussidy.cs プロジェクト: trunglu/trungvui
        private void txt_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string sql;
                if (txt1.Text + "" != "")
                {
                    sql = " a.EMP_ID like N'%" + txt1.Text + "%'";
                }
                else if (txt2.Text + "" != "")
                {
                    sql = " a.EMP_I1 like N'%" + txt2.Text + "%'";
                }
                else
                {
                    sql = " 1=1";
                }
                string dk = Dep.Get_Data("DEP_ID");

                if (dk + "" != "")
                {
                    sql = sql + " and b.DEP_ID=N'" + dk + "'";
                }
                else
                {
                    sql = sql + " and b.DEP_ID in " + T_String.DEP_ID(this.Tag) + " ";
                }

                if (ck.Checked)
                {
                    sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and "
                          + "(a.YYY_MM Between '" + ((DateTime)dt1.Value).ToString("yyyy/MM/dd") + "' and '"
                          + ((DateTime)dt2.Value).ToString("yyyy/MM/dd") + "') "
                          + " and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                          " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
                }
                else
                {
                    sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                          " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
                }

                string wh = GetWh();
                if (wh != "")
                {
                    sql += " and (" + wh + ")";
                }
                nav.Show_VS(sql);
                CheckCols();
            }
        }
コード例 #5
0
        private void Show_VS()
        {
            string sql;

            if (Dep.vs1.Row < 0)
            {
                vs.Rows.Count = 1;
                return;
            }
            if (txt1.Text + "" != "")
            {
                sql = " a.EMP_ID like N'%" + txt1.Text + "%'";
            }
            else if (txt2.Text + "" != "")
            {
                sql = " a.EMP_I1 like N'%" + txt2.Text + "%'";
            }
            else
            {
                sql = " 1=1";
            }
            string dk = Dep.Get_Data("DEP_ID");

            if (dk + "" != "")
            {
                sql = sql + " and b.DEP_ID=N'" + dk + "'";
            }
            else
            {
                sql = sql + " and b.DEP_ID in " + T_String.DEP_ID(this.Tag) + " ";
            }

            if (ck.Checked)
            {
                sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and "
                      + "(MEAL_DT Between '" + ((DateTime)dt1.Value).ToString("yyyy/MM/dd") + "' and '"
                      + ((DateTime)dt2.Value).ToString("yyyy/MM/dd") + "') "
                      + " and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                      " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
            }
            else
            {
                sql = sql + " and  (DEL_BT=0 or DEL_BT is null) and b.DEP_ID in (Select DEP_ID  from SYS_SECURITY_DEP" +
                      " where MNU_ID=" + this.Tag + " and ALL_BT=1 and USER_ID=N'" + PublicFunction.A_UserID + "')";
            }

            nav.Show_VS(sql);
            CheckCols();
        }
コード例 #6
0
 private void nav1_TBarClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Equals(nav1.cmd_refresh))
     {
         if (nav1.wh != "")
         {
             nav1.ToolBar_Click(e);
         }
         else
         {
             nav1.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag));
         }
         return;
     }
     nav1.ToolBar_Click(e);
 }
コード例 #7
0
ファイル: frmTaSea.cs プロジェクト: trunglu/trungvui
 private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
 {
     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) + "  and (VAC_BT is null or VAC_BT=0)");
         }
         show_text();
         return;
     }
     nav.ToolBar_Click(e);
 }
コード例 #8
0
ファイル: frmTaShiftReset.cs プロジェクト: trunglu/trungvui
 private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Equals(nav.cmd_refresh))
     {
         if (nav.wh != "")
         {
             nav.ToolBar_Click(e);
         }
         else
         {
             nav.Show_VS("YYY_MM=N'" + dt3.Text + "' and  DEP_ID in " + T_String.DEP_ID(this.Tag));
         }
         show_cn();
         return;
     }
     nav.ToolBar_Click(e);
 }
コード例 #9
0
ファイル: frmTaSussidy.cs プロジェクト: trunglu/trungvui
        private void Show_VS()
        {
            string sql, wh;

            if (Dep.vs1.Row < 0)
            {
                vs.Rows.Count = 1;
                return;
            }
            string dk = Dep.Get_Data("DEP_ID");

            if (ck.Checked)
            {
                if (dk + "" != "")
                {
                    sql = "b.DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and (DEL_BT=0 or DEL_BT is null) and (ATT_DT Between '"
                          + ((DateTime)dt1.Value).ToString("yyyy/MM/dd") + "' and '"
                          + ((DateTime)dt2.Value).ToString("yyyy/MM/dd") + "')";
                }
                else
                {
                    sql = "b.DEP_ID  in " + T_String.DEP_ID(this.Tag) + " and (DEL_BT=0 or DEL_BT is null) and (ATT_DT Between '"
                          + ((DateTime)dt1.Value).ToString("yyyy/MM/dd") + "' and '"
                          + ((DateTime)dt2.Value).ToString("yyyy/MM/dd") + "')";
                }
            }
            else
            {
                if (dk + "" != "")
                {
                    sql = "b.DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and (DEL_BT=0 or DEL_BT is null)";
                }
                else
                {
                    sql = "b.DEP_ID in " + T_String.DEP_ID(this.Tag) + " and (DEL_BT=0 or DEL_BT is null)";
                }
            }
            wh = GetWh();
            if (wh != "")
            {
                sql += " and (" + wh + ")";
            }
            nav.Show_VS(sql);
            CheckCols();
        }
コード例 #10
0
ファイル: frmTaAbsentVacate.cs プロジェクト: trunglu/trungvui
 private void r1_CheckedChanged(object sender, System.EventArgs e)
 {
     if (r1.Checked)
     {
         nav.Show_VS("(a.VAC_BT is null or a.VAC_BT=0) and (a.DON_AP is null or a.DON_AP=0) and DEP_ID in " + T_String.DEP_ID(this.Tag));
     }
     else
     {
         if (r2.Checked)
         {
             nav.Show_VS("a.VAC_BT=1 and DEP_ID in " + T_String.DEP_ID(this.Tag));
         }
         else
         {
             nav.Show_VS("a.DON_AP=1 and DEP_ID in " + T_String.DEP_ID(this.Tag));
         }
     }
 }
コード例 #11
0
        private void show_vs()
        {
            string sql = "";

            if (ck.Checked)
            {
                sql = "(ATT_DT between '" + DateTime.Parse(dt1.Value + "").ToString("yyyy/MM/dd") + "' and '" +
                      DateTime.Parse(dt2.Value + "").ToString("yyyy/MM/dd") + "') ";
            }
            if (ck1.Checked)
            {
                if (sql != "")
                {
                    sql += " and ";
                }
                sql += " INN_NO=N'" + cb.Text + "' ";
            }
            if (ck3.Checked)
            {
                if (sql != "")
                {
                    sql += " and ";
                }
                sql += "( WOK_TM=0 or WOK_TM is null)";
            }
            if (sql != "")
            {
                sql += " and ";
            }
            if (Dep.Get_Data("DEP_ID") + "" != "")
            {
                sql += "DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and  (DEL_BT=0 or DEL_BT is null)";
            }
            else
            {
                sql += "b.DEP_ID in " + T_String.DEP_ID(this.Tag) + " and (DEL_BT=0 or DEL_BT is null)";
            }
            nav.Show_VS(sql);
        }
コード例 #12
0
 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);
 }
コード例 #13
0
ファイル: frmTaAbsentVacate.cs プロジェクト: trunglu/trungvui
 private void frmTaGraduation_Load(object sender, System.EventArgs e)
 {
     nav.cmd_copy.Visible   = false;
     nav.cmd_search.Visible = false;
     PublicFunction.InitNav(this, vs, nav);
     vs.Cols["TOO_DT"].Format = vs.Cols["FRM_DT"].Format = vs.Cols["SEQ_DT"].Format = PublicFunction.GetOption("DATE");
     nav.Show_VS("(a.VAC_BT is null or a.VAC_BT=0) and (a.DON_AP is null or a.DON_AP=0) and DEP_ID in " + T_String.DEP_ID(this.Tag));
     nav.ToolBar_Auto   = false;
     vs.EnabledChanged += new EventHandler(vs_EnabledChanged);
     vs.BeforeEdit     += new C1.Win.C1FlexGrid.RowColEventHandler(vs_BeforeEdit);
     vs.AfterEdit      += new C1.Win.C1FlexGrid.RowColEventHandler(vs_AfterEdit);
     Basic.Function.PublicFunction.L_Init_Label(this);
     nav.TBarClick += new ToolBarButtonClickEventHandler(nav_TBarClick);
     Init_CB();
     Init_Menu();
 }
コード例 #14
0
        private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
        {
            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));
                if (txt1.Text != vs.Cols[txt1.Tag + ""].Caption && txt1.Text != "")
                {
                    textBox1_KeyDown(txt1, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                }
                else
                {
                    if (txt2.Text != vs.Cols[txt2.Tag + ""].Caption && txt2.Text != "")
                    {
                        textBox1_KeyDown(txt2, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                    }
                    else
                    {
                        if (txt3.Text != vs.Cols[txt3.Tag + ""].Caption && txt3.Text != "")
                        {
                            textBox1_KeyDown(txt3, new System.Windows.Forms.KeyEventArgs(Keys.Enter));
                        }
                        else
                        {
                            if (optAll.Checked == true)
                            {
                                nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' order by a.EMP_ID");
                                //nav.Show_VS("DEP_ID=N'"+Dep.Get_Data("DEP_ID")+"' and YYY_YY=N'"+ dt.Text+"'");
                            }
                            else
                            {
                                if (optWorking.Checked == true)
                                {
                                    nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' and (VAC_BT=0 or VAC_BT is null) order by a.EMP_ID");
                                }
                                else
                                {
                                    nav.Show_VS("DEP_ID in " + T_String.DEP_ID(this.Tag) + " and YYY_YY=N'" + dt.Text + "' and VAC_BT=1 order by a.EMP_ID");
                                }
                            }
//							nav.Show_VS("DEP_ID in "+T_String.DEP_ID(this.Tag) +" and YYY_YY=N'"+dt.Text+"'" );
                        }
                    }
                }

                for (int i = 1; i < vs.Rows.Count; i++)
                {
                    if (vs.Rows[i]["VAC_BT"] + "" == "True")
                    {
                        for (int c = 1; c < vs.Cols.Count; c++)
                        {
                            vs.SetCellStyle(i, c, vs.Styles["VAC_BT"]);
                        }
                    }
                    CAL(i);
                    if (PublicFunction.GetOption("TYP_BT") == "1")                 //quang viet PublicFunction.CUS_ID=="50"
                    {
                        if (T_String.IsNullTo0(T_String.GetDataFromSQL("count(*)", "FILB09A", "EMP_ID='" + vs.Rows[i]["EMP_ID"] + "' AND YEAR(SWI_DT)=" + DateTime.Parse(dt.Value + "").Year)) > 0)
                        {
                            vs.Rows[i]["TYP_HIS"] = "...NatureSwitching...";
                        }
                    }
                }
                return;
            }
            nav.ToolBar_Click(e);
        }
コード例 #15
0
        private void Show_VS()
        {
            string sql;

            if (Dep.vs1.Row < 0)
            {
                vs.Rows.Count = 1;
                return;
            }
            if (ck.Checked)
            {
                sql = "DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and (DEL_BT=0 or DEL_BT is null) and YYY_MM='" + dt1.Text + "' and DEP_ID in " + T_String.DEP_ID(this.Tag);
            }
            else
            {
                sql = "DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and (DEL_BT=0 or DEL_BT is null) and DEP_ID in " + T_String.DEP_ID(this.Tag);
            }
            nav.Show_VS(sql);
            CheckCols();
        }
コード例 #16
0
        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);
        }
コード例 #17
0
        private void Show_VS()
        {
            string sql;

            if (Dep.vs1.Row < 0)
            {
                vs.Rows.Count = 1;
                return;
            }
            if (ck.Checked)
            {
                if (PublicFunction.GetOption("MONTHADDUP") == "1")
                {
                    sql = "DEP_ID in " + Dep.Get_DepAll() + " and (DEL_BT=0 or DEL_BT is null)   and DEP_ID in " + T_String.DEP_ID(this.Tag);
                }
                else
                {
                    sql = "DEP_ID in " + Dep.Get_DepAll() + " and (DEL_BT=0 or DEL_BT is null) and YYY_MM >='" + dt1.Text + "' and YYY_MM <='" + dt2.Text + "' and DEP_ID in " + T_String.DEP_ID(this.Tag);
                }
            }
            else
            {
                sql = "DEP_ID in " + Dep.Get_DepAll() + " and (DEL_BT=0 or DEL_BT is null) and DEP_ID in " + T_String.DEP_ID(this.Tag);
            }
            nav.Show_VS(sql + " and SEQ_NO=" + cb_type.Text);
            CheckCols();
        }