Beispiel #1
0
 private void Show_VS()
 {
     if (Dep.vs1.Row <= 0)
     {
         vs.Rows.Count = 1;
         return;
     }
     nav.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "'  and (VAC_BT is null or VAC_BT=0)");
     show_text();
 }
Beispiel #2
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();
        }
Beispiel #3
0
 private void depvs1_AfterRowColChange(object sender, C1.Win.C1FlexGrid.RangeEventArgs e)
 {
     if (e.OldRange.r1 != e.NewRange.r1)
     {
         nav.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and (DEL_BT=0 or DEL_BT is null)  and  " + PublicFunction.Get_TYP(this.Tag, ""));
         Show_vs();
     }
 }
Beispiel #4
0
        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();
        }
Beispiel #5
0
 private void Show_VS()
 {
     if (Dep.vs1.Row <= 0)
     {
         vs1.Rows.Count = 1;
         return;
     }
     nav1.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' ");
     Show_VS1();
 }
Beispiel #6
0
 private void Show_VS()
 {
     if (Dep.vs1.Row <= 0)
     {
         vs.Rows.Count = 1;
         return;
     }
     nav.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID")
                 + "' and (VAC_BT=0 or VAC_BT is null) and  " + PublicFunction.Get_TYP(this.Tag, ""));
 }
Beispiel #7
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();
        }
Beispiel #8
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);
        }
        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=N'" + Dep.Get_Data("DEP_ID") + "' and YYY_YY=N'" + dt.Text + "'");
                            }
                            else
                            {
                                if (optWorking.Checked == true)
                                {
                                    nav.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and YYY_YY=N'" + dt.Text + "' and (VAC_BT=0 or VAC_BT is null)");
                                }
                                else
                                {
                                    nav.Show_VS("DEP_ID=N'" + Dep.Get_Data("DEP_ID") + "' and YYY_YY=N'" + dt.Text + "' and VAC_BT=1");
                                }
                            }
                            //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++)
                {
                    CAL(i);
                }
                return;
            }
            nav.ToolBar_Click(e);
        }