Esempio n. 1
0
 void gridViewOperation_AfterAdd(PJ_13dlbhjl obj)
 {
     
     CreatRiZhi(obj);
     ParentObj.dzsj = obj.dzsj;
     Client.ClientHelper.PlatformSqlMap.Update<PS_tqdlbh>(ParentObj);
 }
Esempio n. 2
0
        public static void CreatRiZhi(PJ_13dlbhjl obj)
        {


            PJ_gzrjnr gzr = new PJ_gzrjnr();
            gzr.gzrjID = gzr.CreateID();
            gzr.ParentID = obj.ID;
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            IList<PJ_01gzrj> gzrj01 = MainHelper.PlatformSqlMap.GetList<PJ_01gzrj>("SelectPJ_01gzrjList", "where GdsCode='" + MainHelper.User.OrgCode + "' and rq between '" + DateTime.Now.ToString("yyyy-MM-dd 00:00:00") + "' and '" + DateTime.Now.ToString("yyyy-MM-dd 23:59:59") + "'");

            if (gzrj01.Count > 0)
            {
                gzr.gzrjID = gzrj01[0].gzrjID;
            }
            else
            {
                PJ_01gzrj pj = new PJ_01gzrj();
                pj.gzrjID = pj.CreateID();
                pj.GdsCode = MainHelper.User.OrgCode;
                pj.GdsName = MainHelper.User.OrgName;
                pj.CreateDate = DateTime.Now;
                pj.CreateMan = MainHelper.User.UserName;
                gzr.gzrjID = pj.gzrjID;
                pj.rq = DateTime.Now.Date;
                pj.xq = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(DateTime.Now.DayOfWeek);
                pj.rsaqts = (DateTime.Today - MainHelper.UserOrg.PSafeTime.Date).Days;
                pj.sbaqts = (DateTime.Today - MainHelper.UserOrg.DSafeTime.Date).Days;
                Thread.Sleep(new TimeSpan(100000));//0.1毫秒
                MainHelper.PlatformSqlMap.Create<PJ_01gzrj>(pj);


            }
            IList<PJ_gzrjnr> gzrlist = MainHelper.PlatformSqlMap.GetList<PJ_gzrjnr>("SelectPJ_gzrjnrList", "where gzrjID  = '" + gzr.gzrjID + "' order by seq  ");
            if (gzrlist.Count > 0)
            {
                gzr.seq = gzrlist[gzrlist.Count - 1].seq + 1;
            }
            else
                gzr.seq = 1;

            gzr.gznr = "全所目前运行的×个台区剩余电流动作保护期测试";
            gzr.fzr = "配电班长";
            string[] strli = obj.csr.Split(';');
            if (strli.Length < 3)
                gzr.cjry = obj.csr;
            else
            {
                gzr.cjry = strli[0] + "、" + strli[1] + "等" + strli.Length + "人";
            }
            gzr.CreateDate = DateTime.Now;
            gzr.CreateMan = MainHelper.User.UserName;
            gzr.fssj = DateTime.Now;
            MainHelper.PlatformSqlMap.Create<PJ_gzrjnr>(gzr);

        }
Esempio n. 3
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(PJ_13dlbhjl newobj)
 {
     if (parentID == null) return;
   //  mOrg mg = Client.ClientHelper.PlatformSqlMap.GetOne<mOrg>("where OrgCode in(select orgcode from ps_xl where linecode in(select xlcode from ps_tq where tqid='" + parentObj.tqID + "'))");
    
     if (gds!=null)
     {
         newobj.OrgCode=gds.OrgCode;
         newobj.OrgName=gds.OrgName;
     }
     
     newobj.sbID = parentID;
     newobj.CreateDate = DateTime.Now;
     Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
     newobj.CreateMan = m_UserBase.RealName;
 }
Esempio n. 4
0
        private void AddQx(PJ_13dlbhjl obj)
        {
            if (obj.yxqk != "正常")
            {
                MainHelper.PlatformSqlMap.DeleteByKey<PJ_qxfl>(obj.ID);

                PS_tqdlbh ps_tq = ClientHelper.PlatformSqlMap.GetOne<PS_tqdlbh>(" where sbid='" + parentID + "'");

                PJ_qxfl mx = new PJ_qxfl();
                mx.ID = obj.ID;
                mx.OrgCode = obj.OrgCode;
                mx.OrgName = obj.OrgName;
                mx.LineID = "09";
                mx.LineName = ps_tq.InstallAdress;
                mx.xlqd = ps_tq.InstallAdress;
                mx.xssj = obj.CreateDate;
                mx.xsr = obj.csr;
                mx.qxly = "剩余电流动作保护器";
                mx.qxnr = "剩余电流动作保护器" + obj.yxqk;
                mx.qxlb = "紧急缺陷";
                mx.xcqx = mx.xssj.AddDays(3).ToShortDateString();

                //lgmqxlast
                mx.tqid = ps_tq.tqID;
                mx.tqname = ps_tq.tqName;
                MainHelper.PlatformSqlMap.Create<PJ_qxfl>(mx);
            }
        }
Esempio n. 5
0
        void gridViewOperation_AfterAdd(PJ_13dlbhjl obj)
        {
            if (isWorkflowCall)
            {
                WF_ModleRecordWorkTaskIns mrwt = new WF_ModleRecordWorkTaskIns();
                mrwt.ModleRecordID = obj.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.WorkTaskInsId = WorkFlowData.Rows[0]["WorkTaskInsId"].ToString();
                mrwt.CreatTime = DateTime.Now;
                mrwt.ModleTableName = obj.GetType().ToString();
                MainHelper.PlatformSqlMap.Create<WF_ModleRecordWorkTaskIns>(mrwt);
            }

           
            wfgzrz.CreatRiZhi(obj);


            AddQx(obj);
            RefreshData(" where sbID='" + parentID + "' ");

        }
Esempio n. 6
0
        void gridViewOperation_AfterDelete(PJ_13dlbhjl obj)
        {

            string slqwhere = "";
            if (isWorkflowCall)
            {


                MainHelper.PlatformSqlMap.DeleteByWhere<WF_ModleRecordWorkTaskIns>("where ModleRecordID='" +
                   obj.ID + "'"
                   + " and ModleTableName='" + obj.GetType().ToString() + "'"
                   + " and WorkFlowInsId='" + WorkFlowData.Rows[0]["WorkFlowInsId"].ToString() + "'"
                   + " and WorkTaskInsId='" + WorkFlowData.Rows[0]["WorkTaskInsId"].ToString() + "'"
                   );
            }

            RefreshData(" where sbID='" + parentID + "' ");
        }
Esempio n. 7
0
 void gridViewOperation_AfterEdit(PJ_13dlbhjl obj)
 {
     AddQx(obj);
 }