Esempio n. 1
0
 private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Equals(nav.cmd_save))
     {
         vs.Select();
         string dt = T_String.GetDate().ToString("yyyy/MM/dd HH:mm");
         for (int i = 1; i < vs.Rows.Count; i++)
         {
             if (T_String.IsNullTo0(vs.Rows[i].UserData + "") == 1)
             {
                 string st = vs.Rows[i]["NOT_DR"] + "";
                 if (st.IndexOf("Sign") < 0)
                 {
                     vs.Rows[i]["NOT_OR"] = vs.Rows[i]["NOT_DR"];
                 }
                 vs.Rows[i]["NOT_DR"] = PublicFunction.A_UserID + " Sign";
                 vs.Rows[i]["NOT_D1"] = "";
                 vs.Rows[i]["LOC_BT"] = "True";
                 double max = 0;
                 for (int j = 1; j <= 10; j++)
                 {
                     double c1 = T_String.IsNullTo00(vs.Rows[i]["ONN_" + j.ToString("00")] + "");
                     double c2 = T_String.IsNullTo00(vs.Rows[i]["OFF_" + j.ToString("00")] + "");
                     if (c2 > c1 || c1 > max)
                     {
                         string sql = "update FILC01A set YSD_BT=0 where CRD_DT='"
                                      + DateTime.Parse(vs.Rows[i]["ATT_DT"] + "").AddDays(1).ToString("yyyy/MM/dd") + "'";
                         PublicFunction.SQL_Execute(sql);
                         break;
                     }
                 }
                 //							vs.Rows[i]["LST_NM"]=PublicFunction.A_UserID;
                 //							vs.Rows[i]["LST_DT"]=dt;
             }
         }
     }
     if (e.Button.Equals(nav.cmd_refresh))
     {
         txt_KeyDown(txt1, new KeyEventArgs(Keys.Enter));
         return;
     }
     nav.ToolBar_Click(e);
 }
Esempio n. 2
0
 private void nav_TBarClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Equals(nav.cmd_add))
     {
         if (vs.Rows.Count == 1 || (int)vs.Rows[vs.Rows.Count - 1].UserData != 2)
         {
             nav.ToolBar_Click(e);
         }
         //	vs.Rows[vs.Rows.Count-1]["SHI_ID"]=T_String.GetMax("MAX(SHI_ID)","FILC02A").ToString("000");
         return;
     }
     if (e.Button.Equals(nav.cmd_save))
     {
         vs.Select();
         string dt = T_String.GetDate().ToString("yyyy/MM/dd HH:mm");
         for (int i = 1; i < vs.Rows.Count; i++)
         {
             if (T_String.IsNullTo0(vs.Rows[i].UserData + "") != 2)
             {
                 if (T_String.IsNullTo0(vs.Rows[i].UserData + "") == 1)
                 {
                     vs.Rows[i]["LST_NM"] = PublicFunction.A_UserID;
                     vs.Rows[i]["LST_DT"] = dt;
                 }
             }
             else
             {
                 vs.Rows[i]["BLT_NM"] = vs.Rows[i]["LST_NM"] = PublicFunction.A_UserID;
                 vs.Rows[i]["LST_DT"] = vs.Rows[i]["BLT_DT"] = dt;
             }
         }
     }
     nav.ToolBar_Click(e);
     if (e.Button.Equals(nav.cmd_refresh))
     {
         show_vs1();
     }
 }
Esempio n. 3
0
        // apply image to cell
        private void _flex_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
        {
            int row = _flex.MouseRow;
            int col = _flex.MouseCol;

            if (row > -1 && col > -1)
            {
                Image img = e.Data.GetData(typeof(Bitmap)) as Image;
                if (img != null)
                {
                    _flex.SetCellImage(row, col, img);
                    _flex.Select(row, col);
                }
            }
        }