示例#1
0
 void edit2_EditValueChanging(object sender, ChangingEventArgs e)
 {
     if (e.OldValue != e.NewValue)
     {
         GV_Main.SetFocusedRowCellValue("XK006", "");
         GV_Main.SetFocusedRowCellValue("XK006C", "");
         GV_Main.SetFocusedRowCellValue("XH004", 0);
     }
 }
示例#2
0
        private void GV_Main_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            GV_Main.FocusedColumn = GV_Main.Columns["XK006"]; //定位焦点网格的位置
            FocuseRow_Main        = GV_Main.FocusedRowHandle; //获取新焦点行的FocuseRowHandle并初始化全局变量
            GV_Main.ShowEditor();
            GV_Main.SetFocusedRowCellValue("XK001", FData[0]);
            GV_Main.SetFocusedRowCellValue("XK002", FData[1]);
            GV_Main.SetFocusedRowCellValue("XK003", FData[2]);
            int idx = GV_Main.RowCount;

            GV_Main.SetFocusedRowCellValue("XK004", string.Format("{0:0000}", idx));
            GV_Main.SetFocusedRowCellValue("XK005", "1");
            GV_Main.SetFocusedRowCellValue("XH004", 0);
            IsNowAddRow = true;
            //GV_Main.UpdateCurrentRow();
        }
示例#3
0
 private void btnStar1_MouseUp(object sender, MouseEventArgs e)
 {
     if (GetGridStatu() != SingleForm.GridStatu.gsBrowse)
     {
         if (GV_Main.GetFocusedRowCellValue("XR005") == null)
         {
             return;
         }
         string mName  = (sender as SimpleButton).Name;
         int    mGrade = Int32.Parse(mName.Substring(mName.Length - 1, 1));
         if (e.Button == MouseButtons.Right)
         {
             IsGood = false;
             mGrade = mGrade * -1;
         }
         else
         {
             IsGood = true;
         }
         GV_Main.SetFocusedRowCellValue("XR005", mGrade);
     }
 }
示例#4
0
 private void XK006ButtonEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
 {
     //if (GetGridStatu() != BaseForm.GridStatu.gsBrowse)
     {
         int    mRowHandle = GV_Main.FocusedRowHandle;
         string mType      = GV_Main.GetFocusedRowCellValue("XK005").ToString();
         f2.SetMI = new string[] { "POSXH", "002" };
         //f2.SetMIParam = new string[] { GV_Main.GetFocusedRowCellValue("XK005").ToString(), FData[3], FData[4], FData[3], FData[4] };
         //f2.SetMIParam = new string[] { FData[3], FData[4], FData[5], FData[4], FData[5] };
         f2.SetMIParam = new string[] { mType, FData[3], FData[4], FData[5] };
         f2.SetMuity   = true;
         Dictionary <int, List <string> > muity = null;
         if (f2.GetMI)
         {
             muity = f2.GetMuity;
             bool IsExist = false;
             bool IsFirst = true;
             foreach (KeyValuePair <int, List <string> > s in muity)
             {
                 for (int i = 0; i < GV_Main.RowCount; i++)
                 {
                     int idx = GV_Main.GetRowHandle(i);
                     if ((GV_Main.GetRowCellValue(idx, "XK006") == null))
                     {
                         IsExist = false;
                         break;
                     }
                     if (GV_Main.GetRowCellValue(idx, "XK006").ToString() == s.Value[0])
                     {
                         if (GV_Main.GetRowCellValue(idx, "XK005").ToString() == mType)
                         {
                             if (idx == mRowHandle)
                             {
                                 IsFirst = false;
                             }
                             IsExist = true;
                             break;
                         }
                     }
                 }
                 if (IsExist)
                 {
                     IsExist = false;
                     continue;
                 }
                 else
                 {
                     if (IsFirst)
                     {
                         IsFirst = false;
                     }
                     else
                     {
                         GV_Main.AddNewRow();
                     }
                     int mIndex = GV_Main.RowCount;
                     GV_Main.SetFocusedRowCellValue("XK001", FData[0]);
                     GV_Main.SetFocusedRowCellValue("XK002", FData[1]);
                     GV_Main.SetFocusedRowCellValue("XK003", FData[2]);
                     GV_Main.SetFocusedRowCellValue("XK004", string.Format("{0:0000}", mIndex));
                     GV_Main.SetFocusedRowCellValue("XK005", mType);
                     GV_Main.SetFocusedRowCellValue("XK006", s.Value[0]);
                     GV_Main.SetFocusedRowCellValue("XK006C", s.Value[1]);
                     GV_Main.SetFocusedRowCellValue("XH004", s.Value[2]);
                     GV_Main.UpdateCurrentRow();
                 }
             }
         }
     }
 }