예제 #1
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (treeList1.FocusedNode != null)
     {
         frm17Template frm = new frm17Template();
         PJ_17 obj = MainHelper.PlatformSqlMap.GetOneByKey<PJ_17>(treeList1.FocusedNode["ID"]);
         if (obj == null)
             return;
         frm.pjobject = obj;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             Client.ClientHelper.PlatformSqlMap.Update<PJ_17>(frm.pjobject);
             //MessageBox.Show("保存成功");
         }
     }
 }
예제 #2
0
        private void btReAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (btXlList.EditValue == null|| btXlList.EditValue.ToString()=="" )
            {
                return;
            }
            PS_xl xl= btXlList.EditValue as PS_xl;
            PJ_17 pj = new PJ_17();
            pj.CreateDate = DateTime.Now;
            pj.CreateMan = MainHelper.User.UserName;
            pj.LineName = xl.LineName;
            pj.LineCode = xl.LineCode;
            pj.OrgCode  = xl.OrgCode ;
            pj.OrgName = parentObj.OrgName;
            pj.Remark ="";
            MainHelper.PlatformSqlMap.Create<PJ_17>(pj);
            if (isWorkflowCall)
            {
                WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
                mrwt.ModleRecordID = pj.ID;
                mrwt.RecordID = currRecord.ID;
                mrwt.WorkFlowId = WorkFlowData.Rows[0]["WorkFlowId"].ToString();
                mrwt.WorkFlowInsId = WorkFlowData.Rows[0]["WorkFlowInsId"].ToString();
                mrwt.WorkTaskId = WorkFlowData.Rows[0]["WorkTaskId"].ToString();
                mrwt.ModleTableName = pj.GetType().ToString();
                mrwt.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
                mrwt.CreatTime = DateTime.Now;
                MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
                MainHelper.PlatformSqlMap.Update<LP_Record>(currRecord);
            }

            InitData();
            //if (MsgBox.ShowAskMessageBox("是否马上生成条图") == DialogResult.OK)
            {
                
                try
                {
                    if (ExportToExcel("高压配电线路条图", "", pj) < 1) return;

                    frm17Template frm = new frm17Template();
                    frm.pjobject = pj;
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        Client.ClientHelper.PlatformSqlMap.Update<PJ_17>(frm.pjobject);
                        //MessageBox.Show("保存成功");
                    }
                }
                catch (Exception ex)
                {
                    MsgBox.ShowException(ex);  

                }
            }
            
        }
예제 #3
0
        private void barCreat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (treeList1.FocusedNode == null)
                return;

            PJ_17 obj = MainHelper.PlatformSqlMap.GetOneByKey<PJ_17>(treeList1.FocusedNode["ID"]);
            if (obj == null)
                return;
            try
            {
                if (ExportToExcel("高压配电线路条图", "", obj) < 1) return;

                frm17Template frm = new frm17Template();
                frm.pjobject = obj;
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    Client.ClientHelper.PlatformSqlMap.Update<PJ_17>(frm.pjobject);
                    //MessageBox.Show("保存成功");
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex);

            }
        }