Пример #1
0
        private void btReEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (MainHelper.UserOrg == null) return;
            if (gridView1.FocusedRowHandle >= 0)
            {
                DataRow dr = gridView1.GetDataRow(gridView1.FocusedRowHandle) ;
                sdjl_03yxfx yxfx=new sdjl_03yxfx ();
                foreach (DataColumn dc in gridtable.Columns)
                {
                    if (dc.ColumnName != "Image") yxfx.GetType().GetProperty(dc.ColumnName).SetValue(yxfx, dr[dc.ColumnName], null);
                }
                //if (!RecordWorkTask.HaveRunRecordRole(yxfx.ID ,MainHelper.User.UserID   )) return;
                //DataTable dt = RecordWorkTask.GetRecordWorkFlowData(yxfx.ID, MainHelper.User.UserID);
                frmSDyxfxEdit fm = new frmSDyxfxEdit();
                //switch (dt.Rows[0]["TaskInsCaption"].ToString())
                //{
                //    case "领导检查":
                //        fm.RecordStatus = 1;
                //        break;
                //    case "检查人检查":
                //        fm.RecordStatus = 2;
                //        break;

                //}
                //fm.RecordWorkFlowData = dt;
                fm.RowData = yxfx;
                
                if(fm.ShowDialog()== DialogResult.OK)
                RefreshData("where orgcode='" + btGdsList.EditValue + "'and  type like '%" + recordIkind + "%' order by id desc");
            }
            else
            {
                return;
            }
        }
Пример #2
0
        private void btReAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (MainHelper.UserOrg == null) return;
            if (btGdsList.EditValue == null) return;
            //if (!RecordWorkTask.HaveRewNewYXFXRole(recordIkind, MainHelper.User.UserID)) return;
            frmSDyxfxEdit fm = new frmSDyxfxEdit();
            sdjl_03yxfx yxfx = new sdjl_03yxfx();
            //yxfx.OrgCode = MainHelper.UserOrg.OrgCode;
            IList<mOrg> list = Client.ClientHelper.PlatformSqlMap.GetList<mOrg>("where orgcode='" + btGdsList.EditValue + "'");
            mOrg org = null;
            if (list.Count > 0)
                org = list[0];

            yxfx.OrgCode = btGdsList.EditValue.ToString ();
            yxfx.OrgName = org.OrgName;
            yxfx.type = recordIkind;
            yxfx.rq = DateTime.Now;
            fm.RowData = yxfx;
            //fm.RecordStatus = 0;
            fm.ShowDialog();
            //InitData();
            RefreshData("where orgcode='" + btGdsList.EditValue + "'and  type like '%" + recordIkind + "%' order by id desc");
        }