コード例 #1
0
        //新增信息
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                Adapter.Session.Get(CommDataMag.CommonData.CCURRENT_SHIFT_INFO_OBJ, "ShiftID", ref objShiftID);
                Adapter.Session.Get(CommDataMag.CommonData.CCURRENT_SHIFT_INFO_OBJ, "TeamID", ref objTeamID);

                DataRow newrow = dsInnerBuildInfos.Tables[0].NewRow();
                newrow["Input_Time"]       = DateTime.Now;
                newrow["Build_Start_Time"] = DateTime.Now;
                newrow["Build_End_Time"]   = DateTime.Now;
                if (objShiftID != null && objTeamID != null)
                {
                    newrow["TeamID"]  = objTeamID.ToString();
                    newrow["ShiftID"] = objShiftID.ToString();
                }
                newrow["Operator"] = Adapter.Session.User;
                newrow["Note"]     = "";

                dsInnerBuildInfos.Tables[0].Rows.Add(newrow);
                bsInnerBuildInfos.MoveFirst();
                while (((System.Data.DataRowView)(bsInnerBuildInfos.Current)).Row != newrow && bsInnerBuildInfos.Position != dsInnerBuildInfos.Tables[0].Rows.Count - 1)
                {
                    bsInnerBuildInfos.MoveNext();
                }
                LadleInnerBuildMagShowFrm Frm = new LadleInnerBuildMagShowFrm();
                Frm.ShowDialogEx(Adapter.Session, strSort, bsInnerBuildInfos.Position, ref dsInnerBuildInfos);
                GC.Collect();
            }
            catch { }
        }
コード例 #2
0
 //修改信息
 private void dvM_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.RowIndex >= 0 && dsInnerBuildInfos.Tables[0].Rows.Count > 0)
     {
         LadleInnerBuildMagShowFrm Frm = new LadleInnerBuildMagShowFrm();
         Frm.ShowDialogEx(Adapter.Session, strSort, bsInnerBuildInfos.Position, ref dsInnerBuildInfos);
         GC.Collect();
     }
 }