Ejemplo n.º 1
0
    public void btnSure_Click()//可能缺发布人
    {
        RowSelectionModel sm         = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            oracletext = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='通用' and HAZARDS.PROCESSID = " + Hidden1.Value + " ";
        DataTable         dt         = OracleHelper.Query(oracletext).Tables[0];
        int num = 0;

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //插入附表
            string sql = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='引用' and hazards_ore.deptnumber='" + SessionBox.GetUserSession().DeptNumber + "' and hazards.h_number='" + dt.Rows[i]["H_NUMBER"].ToString().Trim() + "'";
            if (OracleHelper.Query(sql).Tables[0].Rows.Count > 0)
            {
                continue;
            }
            string ssql = "insert into HAZARDS_ORE(H_NUMBER,RISK_EVELNUMBER,M_OBJECTNUMBER,M_PERSONNUMBER,DIRECTLYRESPONSIBLEPERSONSNUMB,REGULATORYPARTNERSNUMBER,DATEINPUT,PERSONID,ISPASS,DEPTNUMBER,H_BJW,H_BM,H_F_PINYIN,PROCESSINGMODE,PUNISHMENTSTANDARD,NOTE)";
            ssql += " values ('" + dt.Rows[i]["H_NUMBER"] + "','" + dt.Rows[i]["RISK_EVELNUMBER"].ToString().Trim() + "','" + dt.Rows[i]["M_OBJECTNUMBER"].ToString().Trim() + "','" + dt.Rows[i]["M_PERSONNUMBER"].ToString().Trim() + "','" + dt.Rows[i]["DIRECTLYRESPONSIBLEPERSONSNUMB"].ToString().Trim() + "','" + dt.Rows[i]["REGULATORYPARTNERSNUMBER"].ToString().Trim() + "',sysdate,'','已发布','" + SessionBox.GetUserSession().DeptNumber + "','引用','" + dt.Rows[i]["H_BM"].ToString().Trim() + "','" + dt.Rows[i]["H_F_PINYIN"].ToString().Trim() + "','" + dt.Rows[i]["PROCESSINGMODE"].ToString().Trim() + "','" + dt.Rows[i]["PUNISHMENTSTANDARD"].ToString().Trim() + "','" + dt.Rows[i]["NOTE"].ToString().Trim() + "')";
            OracleHelper.Query(ssql);
            num++;
        }
        GVLoad(Hidden1.Value.ToString().Trim(), "F");
        Ext.Msg.Alert("提示", "共引用" + num + "条!").Show();
    }
Ejemplo n.º 2
0
    protected void YPPTDetailStore_RefershData(object sender, StoreRefreshDataEventArgs e)
    {
        if (cboPlaceTemplate.SelectedIndex > 0)
        {
            if (cboPlaceTemplate.SelectedItem.Value != "-1")
            {
                HBBLL hb = new HBBLL();

                var data2 = hb.GetYPPTDetail(int.Parse(cboPlaceTemplate.SelectedItem.Value), "", SessionBox.GetUserSession().DeptNumber, "");

                this.YPPTDetailStore.DataSource = data2;
                this.YPPTDetailStore.DataBind();
            }
        }
    }
Ejemplo n.º 3
0
    protected void RowClick(object sender, AjaxEventArgs e)
    {
        RowSelectionModel sm = GridPanel3.SelectionModel.Primary as RowSelectionModel;

        btnAction.Disabled = (sm.SelectedRows.Count > 0);
        if (sm.SelectedRows.Count > 0)
        {
            var yb = dc.Yhquote.Where(p => p.Yhid == decimal.Parse(sm.SelectedRow.RecordID) && p.Deptnumber == SessionBox.GetUserSession().DeptNumber);
            if (yb.Count() > 0)
            {
                if (yb.First().Nstatus == 1)
                {
                    btnquote.Disabled  = true;
                    btndel.Disabled    = false;
                    btnAction.Disabled = false;
                }
                else
                {
                    btnquote.Disabled  = false;
                    btndel.Disabled    = true;
                    btnAction.Disabled = true;
                }
            }
            else
            {
                btnquote.Disabled  = false;
                btndel.Disabled    = true;
                btnAction.Disabled = true;
            }
        }
        else
        {
            btnquote.Disabled  = false;
            btndel.Disabled    = true;
            btnAction.Disabled = true;
        }
    }
Ejemplo n.º 4
0
    private void storeload()//执行查询
    {
        var data = from ct in dc.YChargetable
                   from p in dc.Person
                   from d in dc.Department
                   from d1 in dc.Department
                   where ct.Cperson == p.Personnumber && p.Deptid == d.Deptnumber && ct.Maindept == d1.Deptnumber
                   //&& ct.Maindept == SessionBox.GetUserSession().DeptNumber
                   orderby ct.Cdate descending
                   select new
        {
            ct.Recordtime,
            ct.Cdate,
            ct.Cbanci,
            ct.Cperson,
            ct.Maindept,
            ct.Rperson,
            ct.Status,
            p.Name,
            d.Deptname,
            Maindeptname = d1.Deptname,
            ct.Id
        };

        if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
        {
        }
        else
        {
            //初始化模块权限
            UserHandle.InitModule(this.PageTag);
            //如果拥有处理个人信息权限
            if (UserHandle.ValidationHandle(PermissionTag.PersonalOnly))
            {
                data = data.Where(p => p.Cperson == SessionBox.GetUserSession().PersonNumber);
            }
            else if (UserHandle.ValidationHandle(PermissionTag.Deptall))
            {
                data = data.Where(p => p.Maindept == SessionBox.GetUserSession().DeptNumber);
            }
            else
            {
                data = data.Where(p => false);
            }
        }
        if (cbbDept.SelectedIndex > 0)
        {
            data = data.Where(p => p.Maindept == cbbDept.SelectedItem.Value);
        }
        if (cx_date.SelectedValue != null)
        {
            data = data.Where(p => p.Cdate == cx_date.SelectedDate);
        }
        if (cx_banci.SelectedIndex != -1)
        {
            data = data.Where(p => p.Cbanci == cx_banci.SelectedItem.Value);
        }

        Store1.DataSource = data;
        Store1.DataBind();
        RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;

        sm.SelectedRows.Clear();
        sm.UpdateSelection();

        btnPlan.Disabled = true;
        btnDel.Disabled  = true;
    }
Ejemplo n.º 5
0
    public void PlanLoad()
    {
        RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            var ct = dc.YChargetable.First(p => p.Id == int.Parse(sm.SelectedRecordID));
            if (ct.Cdate.Value < System.DateTime.Today || SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
            {
                tb2.Hidden = true;
            }
            else
            {
                tb2.Hidden           = false;
                btnPlaceAdd.Disabled = false;
                lblDetail.Text       = "带班人员:" + dc.Person.First(p => p.Personnumber == ct.Cperson).Name + ";带班班次:" + ct.Cdate.Value.ToString("yyyy-MM-dd") + ct.Cbanci;
            }
            PlanPlaceStoreLoad(Decimal.Parse(sm.SelectedRecordID));
            DetailWindow.Show();
        }
    }
Ejemplo n.º 6
0
        /// <summary>
        /// 更新指定的编码基础信息设置
        /// </summary>
        /// <param name="model">编码基础信息设置实体类</param>
        /// <returns></returns>
        public bool UpdateRulesTreeKind(Model.CS_BaseInfoSet model)
        {
            bool          bl      = true;
            StringBuilder strsSql = new StringBuilder();

            strsSql.Append("select * from CS_BaseInfoSet");
            strsSql.Append(" where INFOID='" + model.INFOID + "'");
            DataSet ds = OracleHelper.Query(strsSql.ToString());

            if (model.STATUS.Trim() == "编辑")
            {
                try
                {
                    #region 信息修改
                    //本单位信息方可修改
                    StringBuilder strSql = new StringBuilder();
                    strSql.Append("update CS_BaseInfoSet set ");
                    strSql.Append("INFONAME=:INFONAME,");
                    strSql.Append("INFOCODE=:INFOCODE,");
                    strSql.Append("CODINGTYPE=:CODINGTYPE,");
                    strSql.Append("CODINGL=:CODINGL,");
                    strSql.Append("PDEPART=:PDEPART,");
                    strSql.Append("PPERID=:PPERID,");
                    strSql.Append("PDAY=:PDAY,");
                    strSql.Append("STATUS=:STATUS");
                    strSql.Append(" where INFOID=:INFOID and PDEPART='" + SessionBox.GetUserSession().DeptNumber + "'");
                    OracleParameter[] parameters =
                    {
                        new OracleParameter(":INFONAME",   OracleType.NVarChar,  500),
                        new OracleParameter(":INFOCODE",   OracleType.NVarChar,   20),
                        new OracleParameter(":CODINGTYPE", OracleType.NVarChar,   20),
                        new OracleParameter(":CODINGL",    OracleType.Number,      4),
                        new OracleParameter(":PDEPART",    OracleType.NVarChar,   20),
                        new OracleParameter(":PPERID",     OracleType.NVarChar,   20),
                        new OracleParameter(":PDAY",       OracleType.DateTime),
                        new OracleParameter(":STATUS",     OracleType.Char,       10),
                        new OracleParameter(":INFOID",     OracleType.Number, 4)
                    };
                    parameters[0].Value = model.INFONAME;                           //名称
                    parameters[1].Value = model.INFOCODE;                           //编码
                    parameters[2].Value = model.CODINGTYPE;                         //下属节点类型
                    parameters[3].Value = model.CODINGL;                            //下属节点长度
                    parameters[4].Value = SessionBox.GetUserSession().DeptNumber;   //登录用户单位-编辑
                    parameters[5].Value = SessionBox.GetUserSession().PersonNumber; //登录用户人员-编辑
                    parameters[6].Value = model.PDAY;                               //编辑日期
                    parameters[7].Value = "编辑";                                     //信息状态
                    parameters[8].Value = model.INFOID;                             //自增主键
                    #endregion

                    if (OracleHelper.ExecuteSql(strSql.ToString(), parameters) >= 1)
                    {
                        bl = true;
                    }
                    else
                    {
                        bl = false;
                    }
                }
                catch
                {
                    bl = false;
                }
            }
            if (model.STATUS.Trim() == "启用" || model.STATUS.Trim() == "禁用")
            {
                bl = false;
            }
            return(bl);
        }
Ejemplo n.º 7
0
    protected void PosSearchRefresh(object sender, StoreRefreshDataEventArgs e)//发布/提交选择责任部门人员刷新
    {
        var pos = (from position in dc.Position
                   from person in dc.Person
                   where position.Posid == person.Posid && person.Areadeptid == cbb_dep.SelectedItem.Value && person.Maindeptid == SessionBox.GetUserSession().DeptNumber
                   select new
        {
            PosID = position.Posid,
            PosName = position.Posname
        }).Distinct();

        PosSearchStore.DataSource = pos;
        PosSearchStore.DataBind();
        cbb_pos.Disabled = pos.Count() > 0 ? false : true;
    }
Ejemplo n.º 8
0
    private DataSet GetSafetyStatistics(DateTime dateBegin, DateTime dateEnd, string maindept, string deptnm, bool isLeader)
    {
        string strSql = string.Format("select distinct dept.deptnumber maindeptid,dept.deptname maindept,kq.deptnumber deptnumber,kq.deptname deptname,u.username,p.personnumber,p.name,pos.posname,pos.MOVEGBLEVEL,nvl(yh.xj,0) xj,nvl(yh.yh,0) yh,nvl(yh.xc,0) YXC,nvl(yh.fxc,0) fxc,nvl(yh.ybh,0) ybh,nvl(yh.wbh,0) wbh,nvl(sw.sw,0) sw,nvl(dl.LoginCount,0) LoginCount from sf_user u inner join person p on u.personnumber = p.personnumber left join department kq on p.areadeptid=kq.deptnumber left join department dept on p.maindeptid=dept.deptnumber left join position pos on p.posid=pos.posid left join (select personid,count(xj) xj,sum(xj) yh ,sum(xc) xc,sum(fxc) fxc,sum(ybh) ybh,sum(wbh) wbh from (" +
                                      //修改隐患排查时间为排查人的个人排查时间
                                      "select nim.personid,nim.pctime,count(*) xj,sum(case when ni.status='现场整改' then 1 else 0 end) xc,sum(case when ni.status='现场整改' then 0 else 1 end) fxc,sum(case when ni.status='现场整改' or ni.status='复查通过' then 1 else 0 end) ybh,sum(case when ni.status='现场整改' or ni.status='复查通过' then 0 else 1 end) wbh from nyhinput ni inner join NYHINPUT_MORE nim on ni.yhputinid=nim.yhputinid  where ni.status not in ('新增','提交审批') and nim.pctime between to_date('{0}','YYYY-MM-DD') and to_date('{1}','YYYY-MM-DD') group by nim.personid,nim.pctime) group by personid ) yh on p.personnumber=yh.personid" +
                                      " left join (select PCPERSONID,count(*) sw from NSWINPUT where pctime between to_date('{2}','YYYY-MM-DD') and to_date('{3}','YYYY-MM-DD') group by PCPERSONID ) sw on p.personnumber=sw.PCPERSONID left join ( SELECT username,count(DISTINCT case when to_number(to_char(vuserlog.activetime,'hh24')) between 0 and 12 then TO_CHAR(vuserlog.activetime,'yyyy-mm-dd')||'上午' when to_number(to_char(vuserlog.activetime,'hh24')) between 12 and 24 then TO_CHAR(vuserlog.activetime,'yyyy-mm-dd')||'下午' end) LoginCount FROM vuserlog  where activetype='登录' and username !='yu' and vuserlog.activetime between to_date('{4}','YYYY-MM-DD') and to_date('{5}','YYYY-MM-DD') group by  vuserlog.username) dl on u.username = dl.username",
                                      dateBegin.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd"), dateBegin.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd"), dateBegin.ToString("yyyy-MM-dd"), dateEnd.ToString("yyyy-MM-dd"));

        strSql += " where 1=1";
        if (UserHandle.ValidationHandle(PermissionTag.SearchAll))
        {
            if (maindept != "-1")
            {
                strSql += string.Format(" and dept.deptnumber='{0}'", maindept);
            }
            if (deptnm != "-1")
            {
                strSql += string.Format(" and kq.deptnumber='{0}'", deptnm);
            }
            if (isLeader)
            {
                strSql += " and pos.movegblevel='矿领导'"; //or pos.posname like '%矿长' or pos.posname like '%副总')";
            }
        }
        else if (UserHandle.ValidationHandle(PermissionTag.SearchMainDept))
        {
            strSql += string.Format(" and dept.deptnumber='{0}'", SessionBox.GetUserSession().DeptNumber);

            if (deptnm != "-1")
            {
                strSql += string.Format(" and kq.deptnumber='{0}'", deptnm);
            }
            if (isLeader)
            {
                strSql += " and pos.movegblevel='矿领导'"; //or pos.posname like '%矿长' or pos.posname like '%副总')";
            }
        }
        else if (UserHandle.ValidationHandle(PermissionTag.SearchDept))
        {
            strSql += string.Format(" and dept.deptnumber='{0}'", SessionBox.GetUserSession().DeptNumber);

            strSql += string.Format(" and kq.deptnumber='{0}'", PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber));

            if (isLeader)
            {
                strSql += " and pos.movegblevel='矿领导'"; //or pos.posname like '%矿长' or pos.posname like '%副总')";
            }
        }
        else if (UserHandle.ValidationHandle(PermissionTag.SearchPersonal))
        {
            strSql += string.Format(" and p.personnumber='{0}'", SessionBox.GetUserSession().PersonNumber);
        }
        else
        {
            return(new DataSet());
        }

        return(OracleHelper.Query(strSql));
    }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            UserHandle.InitModule(this.PageTag);                   //初始化此模块的权限。
            if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限
            {
                dfBegin.SelectedDate = System.DateTime.Today.AddDays(1 - System.DateTime.Today.Day);
                dfEnd.SelectedDate   = System.DateTime.Today;
                //dfBegin.MaxDate = System.DateTime.Today;
                //dfEnd.MaxDate = System.DateTime.Today;

                #region 初始化单位
                MainDeptStore.DataSource = PublicCode.GetMaindept("");
                MainDeptStore.DataBind();
                KQStore.DataSource = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber);
                KQStore.DataBind();
                if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
                {
                    cbbKQ.Disabled = true;
                }
                else
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                }

                #endregion
                //LoadData();
                if (UserHandle.ValidationHandle(PermissionTag.SearchAll))
                {
                    cbbMianDept.Disabled = false;
                    cbbKQ.Disabled       = false;
                    btnSearch.Disabled   = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchMainDept))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.Disabled     = false;
                    btnSearch.Disabled = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchDept))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.SelectedItem.Value       = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber);
                    cbbKQ.Disabled     = true;
                    btnSearch.Disabled = false;
                }
                else if (UserHandle.ValidationHandle(PermissionTag.SearchPersonal))
                {
                    cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
                    cbbMianDept.Disabled           = true;
                    cbbKQ.SelectedItem.Value       = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber);
                    cbbKQ.Disabled     = true;
                    btnSearch.Disabled = false;
                }
                else
                {
                    btnSearch.Disabled = true;
                }
            }
            else
            {
                Session["ErrorNum"] = "0";
                Response.Redirect("~/Error.aspx");
            }
        }
    }
Ejemplo n.º 10
0
    public void btncancel_Click()//逐条取消
    {
        RowSelectionModel sm   = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            sql  = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='引用' and HAZARDS_ORE.DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and HAZARDS.HAZARDSID=" + sm.SelectedRow.RecordID;
        DataTable         dt   = OracleHelper.Query(sql).Tables[0];
        string            ssql = "delete HAZARDS_ORE where ID='" + dt.Rows[0]["ID"].ToString().Trim() + "'";

        OracleHelper.Query(ssql);
        GVLoad(Hidden1.Value.ToString().Trim(), "F");
        Ext.Msg.Alert("提示", "取消成功!").Show();
    }
Ejemplo n.º 11
0
    //绑定本单位未引用危险源信息-周义生
    private void bindH_YY()
    {
        string oraceltext = "select HAZARDSID,a.infoname ZYNAME,worktasks.worktask GZRWNAME,process.name GXNAME,H_CONTENT,b.infoname FXLX,H_CONSEQUENCES,c.infoname SGLX,HAZARDS.ISPASS,(case nvl(d.id,-1) when -1 then  '通用' else '已引用' end) ISGROUP from HAZARDS inner join process on HAZARDS.PROCESSID=process.processid inner join worktasks on process.worktaskid=worktasks.worktaskid inner join CS_BASEINFOSET a on worktasks.professionalid=a.infoid inner join CS_BASEINFOSET b on HAZARDS.Risk_Typesnumber=b.infoid inner join CS_BASEINFOSET c on HAZARDS.Accident_Typenumber=c.infoid left join (select * from HAZARDS_ORE where HAZARDS_ORE.DEPTNUMBER='{0}') d on HAZARDS.h_Number=d.H_NUMBER where HAZARDSID in (select hazardsid from hazards  where not exists (select hazards_ore.h_number from hazards_ore where hazards.h_number=hazards_ore.h_number and  hazards_ore.deptnumber=" + SessionBox.GetUserSession().DeptNumber + ") )";

        hazardsStore.DataSource = OracleHelper.Query(oraceltext);
        hazardsStore.DataBind();
    }
Ejemplo n.º 12
0
    public void btnyy_Click()//逐条引用
    {
        RowSelectionModel sm   = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            sql  = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='通用' and HAZARDS.HAZARDSID=" + sm.SelectedRow.RecordID;
        DataTable         dt   = OracleHelper.Query(sql).Tables[0];
        string            ssql = "insert into HAZARDS_ORE(H_NUMBER,RISK_EVELNUMBER,M_OBJECTNUMBER,M_PERSONNUMBER,DIRECTLYRESPONSIBLEPERSONSNUMB,REGULATORYPARTNERSNUMBER,DATEINPUT,PERSONID,ISPASS,DEPTNUMBER,H_BJW,H_BM,PROCESSINGMODE,PUNISHMENTSTANDARD,NOTE,SCORES,LEVELID)";

        ssql += " values ('" + dt.Rows[0]["H_NUMBER"] + "','" + extRISK_EVELNUMBER.SelectedItem.Value + "','" + extM_OBJECTNUMBER.SelectedItem.Value + "','" + extM_PERSONNUMBER.SelectedItem.Value + "','" + extDIRECTLYRESPONSIBLEPERSONSNUMB.SelectedItem.Value + "','" + extREGULATORYPARTNERSNUMBER.SelectedItem.Value + "',sysdate,'','已发布','" + SessionBox.GetUserSession().DeptNumber + "','引用','" + extH_BM.Text.Trim() + "','" + extPROCESSINGMODE.SelectedItem.Value + "','" + extPUNISHMENTSTANDARD.Text.Trim() + "','" + extNOTE.Text.Trim() + "','" + extSCORES.Text.Trim() + "','" + extLEVELID.SelectedItem.Value + "')";
        OracleHelper.Query(ssql);
        OracleHelper.Query("update HAZARDS_ORE set H_F_PINYIN=F_PINYIN('" + extH_BM.Text.Trim() + "') where H_BJW='引用' and DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and H_NUMBER=" + dt.Rows[0]["H_NUMBER"]);//更新别名拼音 助记码
        GVLoad(Hidden1.Value.ToString().Trim(), "F");
        Ext.Msg.Alert("提示", "引用成功!").Show();
    }
Ejemplo n.º 13
0
    public void btnSave_Click()//修改引用
    {
        RowSelectionModel sm        = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            sql       = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='引用' and HAZARDS_ORE.DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and HAZARDS.HAZARDSID=" + sm.SelectedRow.RecordID;
        DataTable         dt        = OracleHelper.Query(sql).Tables[0];
        string            updatesql = "update HAZARDS_ORE set M_OBJECTNUMBER='" + extM_OBJECTNUMBER.SelectedItem.Value + "',M_PERSONNUMBER='" + extM_PERSONNUMBER.SelectedItem.Value + "',RISK_EVELNUMBER='" + extRISK_EVELNUMBER.SelectedItem.Value + "',DIRECTLYRESPONSIBLEPERSONSNUMB='" + extDIRECTLYRESPONSIBLEPERSONSNUMB.SelectedItem.Value + "',REGULATORYPARTNERSNUMBER='" + extREGULATORYPARTNERSNUMBER.SelectedItem.Value + "',PROCESSINGMODE='" + extPROCESSINGMODE.SelectedItem.Value + "',PUNISHMENTSTANDARD='" + extPUNISHMENTSTANDARD.Text.Trim() + "',H_BM='" + extH_BM.Text.Trim() + "',NOTE='" + extNOTE.Text.Trim() + "',H_F_PINYIN=F_PINYIN('" + extH_BM.Text.Trim() + "'),SCORES='" + extSCORES.Text.Trim() + "',LEVELID='" + extLEVELID.SelectedItem.Value + "',SW_BM='" + extSW_BM.Text.Trim() + "',SW_PINYIN=F_PINYIN('" + extSW_BM.Text.Trim() + "'),SW_SCORES='" + extSW_SCORES.Text.Trim() + "',SW_LEVELID='" + extSW_LEVELID.SelectedItem.Value + "',SW_PUNISHMENTSTANDARD='" + extSW_PUNISHMENTSTANDARD.Text.Trim() + "'";

        updatesql += " where H_BJW='引用' and DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and H_NUMBER=" + dt.Rows[0]["H_NUMBER"].ToString().Trim();
        OracleHelper.Query(updatesql);
        //OracleHelper.Query("update HAZARDS_ORE set H_F_PINYIN=F_PINYIN('" + extH_BM.Text.Trim() + "') where H_BJW='引用' and DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and H_NUMBER=" + dt.Rows[0]["H_NUMBER"].ToString().Trim());//更新别名拼音 助记码
        GVLoad(Hidden1.Value.ToString().Trim(), "F");
        Ext.Msg.Alert("提示", "保存成功!").Show();
    }
Ejemplo n.º 14
0
    public void btnC_Click()//全部取消
    {
        RowSelectionModel sm         = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            oracletext = "select * from HAZARDS inner join HAZARDS_ORE on HAZARDS.H_NUMBER=HAZARDS_ORE.H_NUMBER where HAZARDS_ORE.H_BJW='引用' and HAZARDS_ORE.DEPTNUMBER='" + SessionBox.GetUserSession().DeptNumber + "' and HAZARDS.PROCESSID = " + Hidden1.Value + " ";
        DataTable         dt         = OracleHelper.Query(oracletext).Tables[0];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //附表删除
            string ssql = "delete HAZARDS_ORE where ID='" + dt.Rows[i]["ID"].ToString().Trim() + "'";
            OracleHelper.Query(ssql);
        }
        GVLoad(Hidden1.Value.ToString().Trim(), "F");
        Ext.Msg.Alert("提示", "共取消" + dt.Rows.Count + "条!").Show();
    }
Ejemplo n.º 15
0
    private bool SetSWbase(string ID)//加载三违基本信息 已改
    {
        try
        {
            var data = (from sw in dc.Nswinput
                        from ha in dc.Getswandhazusing
                        from per1 in dc.Person
                        from per2 in dc.Person
                        from dep in dc.Department
                        join pl in dc.Place on sw.Placeid equals pl.Placeid into gg
                        from ga in gg.DefaultIfEmpty()
                        where sw.Swid == ha.Swid &&
                        sw.Pcpersonid == per1.Personnumber && sw.Swpersonid == per2.Personnumber &&
                        ha.Deptnumber == SessionBox.GetUserSession().DeptNumber &&
                        per2.Deptid == dep.Deptnumber
                        orderby sw.Intime descending
                        select new
            {
                sw.Id,
                Swperson = per2.Name,
                Kqid = dep.Deptnumber,
                Kqname = dep.Deptname,
                ha.Swcontent,
                ha.Levelid,
                ha.Levelname,
                Placename = ga.Placename == null ? "已删除" : ga.Placename,
                sw.Banci,
                Pcname = per1.Name,
                sw.Pctime,
                PCname = per1.Name,
                Name = per2.Name,
                Ispublic = sw.Ispublic == 1,
                Isend = sw.Isend.Value == 1,
                sw.Remarks,
                Dwid = sw.Maindeptid,
                sw.Pcpersonid,
                sw.Swpersonid
            }).First();
            //三违基本信息
            //0.基本信息绑定
            lbl_SWPutinID.Text = data.Id.ToString();
            lbl_DeptName.Text  = data.Kqname.Trim();
            lbl_PlaceName.Text = data.Placename.Trim();
            lbl_SWContent.Text = data.Swcontent.Trim();
            lbl_BanCi.Text     = data.Banci.Trim();
            lbl_Name.Text      = data.Swperson.Trim();
            lbl_rName.Text     = data.Pcname.Trim();
            try
            {
                lbl_PCTime.Text = data.Pctime.Value.ToString("yyyy年MM月dd日");
            }
            catch
            {
                lbl_PCTime.Text = "无";
            }
            lbl_SWLevel.Text = data.Levelname.Trim();
            try
            {
                lbldRemarks.Text = data.Remarks;
            }
            catch
            {
                lbldRemarks.Text = "";
            }
            try
            {
                lbl_IsEnd.Text = data.Isend ? "是" : "否";
            }
            catch
            {
                lbl_IsEnd.Text = "否";
            }

            // 罚款信息
            string msg = "";
            var    fk  = from nd in dc.Nswfinedetail
                         from l in dc.Objectset
                         from p in dc.Person
                         from s1 in dc.Nswinput
                         from sw in dc.Swbase
                         from f in dc.Swfineset
                         where nd.Pid == l.Pid && nd.Personnumber == p.Personnumber && nd.Id == decimal.Parse(ID) &&
                         nd.Id == s1.Id && s1.Swid == sw.Swid && s1.Maindeptid == f.Deptnumber && sw.Levelid == f.Levelid && nd.Pid == f.Pid
                         select new
            {
                l.Pname,
                p.Name,
                Fine = s1.Jctype == 0 ? f.Kcfine : f.Zcfine
            };

            foreach (var r in fk)
            {
                msg += "<b>" + r.Pname + ":</b>" + r.Name + "(" + r.Fine + "元)";
            }
            lbl_fkxx.Html = msg == "" ? "无" : msg;
            return(true);
        }
        catch
        {
            return(false);
        }
    }
Ejemplo n.º 16
0
    /// <summary>
    /// 绑定用户数据
    /// </summary>
    protected void InitData()
    {
        string  strWhere = "1=1";
        SF_Role r        = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0]));

        rolelevel  = r.LevelID;
        maindeptid = SessionBox.GetUserSession().DeptNumber;
        switch ((int)rolelevel)
        {
        case 0:
            //BindDll(ddlDept, "deptnumber like'%00000' and deptname like'%公司'", "DEPTNAME", "DEPTNUMBER");
            BindDll(ddlDept, "(substr(deptnumber,1,2)='23' or substr(deptnumber,1,2)='24' or substr(deptnumber,1,2)='13'  or substr(deptnumber,1,2)='55' or substr(deptnumber,1,4)='5503' or substr(deptnumber,1,4)='5504' or substr(deptnumber,1,4)='5513' or substr(deptnumber,1,4)='5564') and substr(deptnumber,5,5)='00000'", "DEPTNAME", "DEPTNUMBER");
            break;

        case 1:
            strWhere += " and userid != 1";
            //BindDll(ddlDept, "deptnumber like'%00000' and deptname like'%公司'", "DEPTNAME", "DEPTNUMBER");
            BindDll(ddlDept, "(substr(deptnumber,1,2)='23' or substr(deptnumber,1,2)='24' or substr(deptnumber,1,2)='13'  or substr(deptnumber,1,2)='55' or substr(deptnumber,1,4)='5503' or substr(deptnumber,1,4)='5504' or substr(deptnumber,1,4)='5513' or substr(deptnumber,1,4)='5564') and substr(deptnumber,5,5)='00000'", "DEPTNAME", "DEPTNUMBER");
            break;

        case 2:
            strWhere += " and userid != 1 and DEPTNUMBER=" + SessionBox.GetUserSession().DeptNumber;
            //BindDll(ddlDept, "deptnumber like'%00000' and deptname like'%公司'", "DEPTNAME", "DEPTNUMBER");
            BindDll(ddlDept, "(substr(deptnumber,1,2)='23' or substr(deptnumber,1,2)='24' or substr(deptnumber,1,2)='13'  or substr(deptnumber,1,2)='55' or substr(deptnumber,1,4)='5503' or substr(deptnumber,1,4)='5504' or substr(deptnumber,1,4)='5513' or substr(deptnumber,1,4)='5564') and substr(deptnumber,5,5)='00000'", "DEPTNAME", "DEPTNUMBER");
            ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber;
            BindDll(ddlKQ, "ID", ddlDept.SelectedItem.Value.Remove(4), "NAME", "ID");
            ddlDept.Enabled = false;
            break;

        default:
            strWhere += " and userid != 1 and DEPTNUMBER=" + SessionBox.GetUserSession().DeptNumber;
            BindDll(ddlDept, "(substr(deptnumber,1,2)='23' or substr(deptnumber,1,2)='24' or substr(deptnumber,1,2)='13'  or substr(deptnumber,1,2)='55' or substr(deptnumber,1,4)='5503' or substr(deptnumber,1,4)='5504' or substr(deptnumber,1,4)='5513' or substr(deptnumber,1,4)='5564') and substr(deptnumber,5,5)='00000'", "DEPTNAME", "DEPTNUMBER");
            ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber;
            BindDll(ddlKQ, "ID", ddlDept.SelectedItem.Value.Remove(4), "NAME", "ID");
            ddlDept.Enabled = false;
            break;
        }
        //string strWhere = "1=1";
        //if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "31")
        //{
        //    //Session["WhereUser"] = "******";
        //}
        //else if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "2" || SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "46")
        //{
        //    //Session["WhereUser"] = "******";
        //    //Session["WhereRole"] = "roleid NOT in(31)";
        //    strWhere += " and userid != 1";
        //}
        //else
        //{
        //    //Session["WhereRole"] = "roleid NOT in(2,31,46)";
        //    //Session["WhereUserGroup"] = "usergroupid not in(2,3,23)";
        //    //Session["WhereUser"] = "******" + SessionBox.GetUserSession().DeptNumber;
        //    strWhere += " and userid != 1 and DEPTNUMBER=" + SessionBox.GetUserSession().DeptNumber;
        //    ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber;
        //    ddlDept.Enabled = false;
        //}
        Session["WhereRole"] = "ROLESTATUS=1";
        var ds = bll.GetUserList2(strWhere, " ORDER BY CreateTime DESC");

        ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = strWhere;
        ObjectDataSource1.SelectParameters["strOrder"].DefaultValue = " ORDER BY CreateTime DESC";
        if (ds.Tables[0].Rows.Count == 0)
        {
            GridViewMsg.InnerText = "无记录";
        }
        else
        {
            GridViewMsg.InnerText = "共有" + ds.Tables[0].Rows.Count + "条记录";
        }
        gridUser.DataSourceID = ObjectDataSource1.ID;
        //gvUserList.DataSource = ds;
        gridUser.DataBind();
        gridUser.KeyFieldName = "USERID";
    }
Ejemplo n.º 17
0
    private void storeload()//执行查询
    {
        //var predicate = PredicateBuilder.True<Getsanwei>();

        //if (!df_begin.IsNull)
        //{
        //    predicate = predicate.And(p => p.Pctime > df_begin.SelectedDate);
        //}
        //if (!df_end.IsNull)
        //{
        //    predicate = predicate.And(p => p.Pctime < df_begin.SelectedDate);
        //}
        //if (cbb_part.SelectedItem.Value != null)
        //{
        //    predicate = predicate.And(p => p.Kqname.Contains(cbb_part.SelectedItem.Text));
        //}
        //var sanwei = dc.Getsanwei.Where(predicate);
        if (df_begin.IsNull || df_end.IsNull)
        {
            Ext.Msg.Alert("提示", "请选择时间段!").Show();
            return;
        }
        if (df_begin.SelectedDate > df_end.SelectedDate)
        {
            Ext.Msg.Alert("提示", "时间选择有误!").Show();
            return;
        }
        var sanwei = from sw in dc.Nswinput
                     from sb in dc.Swbase
                     from c in dc.CsBaseinfoset
                     from p in dc.Person
                     from p1 in dc.Person
                     from d in dc.Department
                     from d1 in dc.Department
                     from pl in dc.Place
                     where sw.Swid == sb.Swid && sb.Levelid == c.Infoid && sw.Swpersonid == p.Personnumber && p.Areadeptid == d.Deptnumber &&
                     sw.Placeid == pl.Placeid && sw.Maindeptid == d1.Deptnumber && sw.Pcpersonid == p1.Personnumber
                     orderby p.Areadeptid, sb.Levelid, sw.Pcpersonid descending
            select new
        {
            ID        = sw.Id,
            Name      = p.Name,
            Dwid      = d1.Deptnumber,
            Dwname    = d1.Deptname,
            Kqid      = d.Deptnumber,
            DeptName  = d.Deptname,
            SWContent = sb.Swcontent,
            SWLevel   = c.Infoname,
            PlaceName = pl.Placename,
            BanCi     = sw.Banci,
            PCName    = p1.Name,
            PCTime    = sw.Pctime,
            IsPublic  = sw.Ispublic == 1 ? true : false,
            IsEnd     = sw.Isend == 1 ? true : false
        };

        if (!df_begin.IsNull && !df_end.IsNull)
        {
            sanwei = sanwei.Where(p => p.PCTime >= df_begin.SelectedDate && p.PCTime <= df_end.SelectedDate);
        }
        if (cbb_part.SelectedIndex > -1)
        {
            sanwei = sanwei.Where(p => p.Kqid.Substring(0, 7) == cbb_part.SelectedItem.Value.Substring(0, 7));
        }

        if (cbbUnit.SelectedIndex > -1)
        {
            sanwei = sanwei.Where(p => p.Dwid == cbbUnit.SelectedItem.Value);
            //if (SessionBox.GetUserSession().rolelevel.Trim().IndexOf("1") > -1)
            //{
            //    data = data.Where(p => p.Levelname == "A");
            //}
        }
        else if (SessionBox.GetUserSession().rolelevel.Trim().IndexOf("2") > -1)
        {
            sanwei = sanwei.Where(p => p.Dwid == SessionBox.GetUserSession().DeptNumber);
        }

        Store1.DataSource = sanwei;
        Store1.DataBind();
        btn_detail.Disabled = true;
        //"ID" Type="String" />
        //                <ext:RecordField Name="Name" />
        //                <ext:RecordField Name="DeptName" />
        //                <ext:RecordField Name="SWContent" />
        //                <%--<ext:RecordField Name="SWLevel" />--%>
        //                <ext:RecordField Name="PlaceName" />
        //                <ext:RecordField Name="BanCi" />
        //                <ext:RecordField Name="PCName" />
        //                <ext:RecordField Name="PCTime" Type="Date" DateFormat="Y-m-dTh:i:s" />
        //                <%--<ext:RecordField Name="IsPublic" Type="Boolean" />--%>
        //                <ext:RecordField Name="IsEnd" Type="Bo
        //////不同角色进入获取不同数据
        //string pID = "";
        //var q = from p in dc.Person2
        //        where p.PersonNumber == SessionBox.GetUserSession().PersonNumber
        //        select new
        //        {
        //            p.PersonID
        //        };
        //foreach (var r in q)
        //{
        //    pID = r.PersonID.ToString();
        //}
        //switch (SessionBox.GetUserSession().CurrentRole[0].ToString().Substring(0, SessionBox.GetUserSession().CurrentRole[0].ToString().IndexOf(",")).Trim())
        //{
        //    //走动干部所排查的三违信息
        //    case "4":
        //        var data = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        "",
        //                        pID
        //                        );
        //        Store1.DataSource = data;
        //        btn_print.Disabled = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        "",
        //                        pID
        //                        ).Count() > 0 ? false : true;
        //        break;
        //    //(责任部门)三违人员的三违信息
        //    case "5":
        //        data = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        pID,
        //                        ""
        //                        );
        //        Store1.DataSource = data;
        //        btn_print.Disabled = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        pID,
        //                        ""
        //                        ).Count() > 0 ? false : true;
        //        break;
        //    default:
        //        data = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        "",
        //                        ""
        //                        );
        //        Store1.DataSource = data;
        //        btn_print.Disabled = dc.GetSWbysearch(
        //                        df_begin.IsNull ? "" : df_begin.SelectedDate.ToString("yyyy-MM-dd"),
        //                        df_end.IsNull ? "" : df_end.SelectedDate.ToString("yyyy-MM-dd"),
        //                        "",
        //                        cbb_part.SelectedItem.Value.Trim(),
        //                        cbb_lavel.SelectedItem.Value.Trim(),
        //                        "",
        //                        ""
        //                        ).Count() > 0 ? false : true;
        //        break;
        //}
        //Store1.DataBind();
        //btn_detail.Disabled = true;
    }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Aspose.Cells.License license = new Aspose.Cells.License();

            //license.SetLicense("License.lic");


            if (!SessionBox.CheckUserSession())
            {
                Response.Redirect("~/Login.aspx");
            }
            else
            {
                SF_Role r = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0]));
                rolelevel  = (int)r.LevelID;
                maindeptid = SessionBox.GetUserSession().DeptNumber;
                switch ((int)rolelevel)
                {
                case 0:
                    //Session["WhereRole"] = string.Format(" levelid >={0}", rolelevel);
                    InitRole(string.Format(" levelid >={0}", rolelevel));
                    InitUserGroup("");
                    break;

                case 1:
                    //Session["WhereRole"] = string.Format(" levelid >={0}", rolelevel);
                    InitRole(string.Format(" levelid >={0}", rolelevel));
                    InitUserGroup("");
                    break;

                case 2:
                    //Session["WhereRole"] = string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString());
                    //Session["WhereUserGroup"] = "usergroupid not in(2,3,23)";
                    InitRole(string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString()));
                    InitUserGroup("usergroupid not in(2,3,23)");
                    break;

                default:
                    //Session["WhereRole"] = string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString());
                    //Session["WhereUserGroup"] = "usergroupid not in(2,3,23)";
                    InitRole(string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString()));
                    InitUserGroup("usergroupid not in(2,3,23)");
                    break;
                }


                UserHandle.InitModule(this.PageTag);                   //初始化此模块的权限。
                if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限
                {
                    //UserHandle.BindDropDownList(ddlUserGroup, 0);
                    //DevExpress.Web.ASPxGridView.GridViewCommandColumn colEdit = (DevExpress.Web.ASPxGridView.GridViewCommandColumn)gridUser.Columns["编辑"];
                    //DevExpress.Web.ASPxGridView.GridViewCommandColumn colDel = (DevExpress.Web.ASPxGridView.GridViewCommandColumn)gridUser.Columns["删除"];
                    if (!UserHandle.ValidationHandle(PermissionTag.Add))
                    {
                        btnAddUser.Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.Edit))
                    {
                        gridUser.Columns["编辑"].Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.Delete))
                    {
                        gridUser.Columns["删除"].Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.Search))
                    {
                        btnSearch.Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.BatchEditRole))
                    {
                        btnEditRole.Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.BatchEditUsergroup))
                    {
                        btnEditUsergroup.Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.ResetPassword))
                    {
                        gridUser.Columns["密码重置"].Visible = false;
                    }
                    if (!UserHandle.ValidationHandle(PermissionTag.ImportUser))
                    {
                        btnBatchAddUser.Visible = false;
                    }
                }
                else
                {
                    Session["ErrorNum"] = "0";
                    Response.Redirect("~/Error.aspx");
                }
                InitData();
            }
        }
    }
Ejemplo n.º 19
0
        /// <summary>
        /// 删除/禁用一个编码基础信息设置
        /// </summary>
        /// <param name="OperatorID">编码基础信息设置ID</param>
        /// <returns></returns>
        public bool DeleteBaseInfoSet(Model.CS_BaseInfoSet model)
        {
            bool          bl      = true;
            StringBuilder strsSql = new StringBuilder();

            //根据主键获取CS_BaseInfoSet表中信息
            strsSql.Append("select * from CS_BaseInfoSet");
            strsSql.Append(" where INFOID='" + model.INFOID + "'");
            DataSet ds = OracleHelper.Query(strsSql.ToString());

            StringBuilder strSql = new StringBuilder();

            //根据信息状态不同,处理过程不同
            if (ds.Tables[0].Rows[0]["STATUS"].ToString().Trim() == "编辑")
            {
                try
                {
                    #region 信息删除
                    //直接删除-本单位信息
                    strSql.Append("delete CS_BaseInfoSet");
                    strSql.Append(" where INFOID=:INFOID and PDEPART='" + SessionBox.GetUserSession().DeptNumber + "'");
                    OracleParameter[] parameters =
                    {
                        new OracleParameter(":INFOID", OracleType.Number, 4)
                    };
                    parameters[0].Value = model.INFOID;
                    #endregion

                    if (OracleHelper.ExecuteSql(strSql.ToString(), parameters) >= 1)
                    {
                        bl = true;
                    }
                    else
                    {
                        bl = false;
                    }
                }
                catch
                {
                    bl = false;
                }
            }
            if (ds.Tables[0].Rows[0]["STATUS"].ToString().Trim() == "启用")
            {
                try
                {
                    #region 主表信息禁用
                    //1、若有根节点,禁用
                    //2、主信息禁用
                    //strSql.Append("update CS_BaseInfoSet set ");
                    //strSql.Append("STATUS=:STATUS");
                    //strSql.Append(" where INFOID in ( ");
                    //strSql.Append(" select INFOID from CS_BaseInfoSet ");
                    //strSql.Append(" start with INFOID=:INFOID ");
                    //strSql.Append(" connect by prior INFOID=FID ) ");

                    //信息禁用
                    strSql.Append("update CS_BaseInfoSet set ");
                    strSql.Append("STATUS=:STATUS");
                    strSql.Append(" where INFOID=:INFOID and PDEPART='" + SessionBox.GetUserSession().DeptNumber + "'");
                    OracleParameter[] parameters =
                    {
                        new OracleParameter(":STATUS", OracleType.Char,   10),
                        new OracleParameter(":INFOID", OracleType.Number, 4)
                    };
                    parameters[0].Value = "禁用";
                    parameters[1].Value = model.INFOID;
                    OracleHelper.ExecuteSql(strSql.ToString(), parameters);
                    #endregion

                    #region 历史入库
                    StringBuilder strhSql = new StringBuilder();
                    strhSql.Append("insert into CS_BaseInfoSetHistory(");
                    strhSql.Append("INFOID,INFONAME,INFOCODE,FID,CODINGTYPE,CODINGL,PDEPART,PPERID,PDAY,SPERID,SDAY,REMARKS,STATUS,HPERID,HDAY,HREMARKS,HSTATUS)");
                    strhSql.Append(" values(");
                    strhSql.Append(":INFOID,:INFONAME,:INFOCODE,:FID,:CODINGTYPE,:CODINGL,:PDEPART,:PPERID,:PDAY,:SPERID,:SDAY,:REMARKS,:STATUS,:HPERID,:HDAY,:HREMARKS,:HSTATUS)");
                    OracleParameter[] parametersH =
                    {
                        new OracleParameter(":INFOID",     OracleType.Number,      4),
                        new OracleParameter(":INFONAME",   OracleType.NVarChar,  500),
                        new OracleParameter(":INFOCODE",   OracleType.NVarChar,   20),
                        new OracleParameter(":FID",        OracleType.Number,      4),
                        new OracleParameter(":CODINGTYPE", OracleType.NVarChar,   20),
                        new OracleParameter(":CODINGL",    OracleType.NVarChar,   20),
                        new OracleParameter(":PDEPART",    OracleType.NVarChar,   20),
                        new OracleParameter(":PPERID",     OracleType.NVarChar,   20),
                        new OracleParameter(":PDAY",       OracleType.DateTime),
                        new OracleParameter(":SPERID",     OracleType.NVarChar,   20),
                        new OracleParameter(":SDAY",       OracleType.DateTime),
                        new OracleParameter(":REMARKS",    OracleType.NVarChar,  200),
                        new OracleParameter(":STATUS",     OracleType.Char,       10),
                        new OracleParameter(":HPERID",     OracleType.NVarChar,   20),
                        new OracleParameter(":HDAY",       OracleType.DateTime),
                        new OracleParameter(":HREMARKS",   OracleType.NVarChar,  200),
                        new OracleParameter(":HSTATUS",    OracleType.Char, 10)
                    };
                    parametersH[0].Value  = model.INFOID;                             //自增主键
                    parametersH[1].Value  = model.INFONAME;                           //名称
                    parametersH[2].Value  = model.INFOCODE;                           //编码
                    parametersH[3].Value  = model.FID;                                //父节点
                    parametersH[4].Value  = model.CODINGTYPE;                         //下属节点类型
                    parametersH[5].Value  = model.CODINGL;                            //下属节点长度
                    parametersH[6].Value  = model.PDEPART;                            //登录用户单位-编辑
                    parametersH[7].Value  = model.PPERID;                             //登录用户人员-编辑
                    parametersH[8].Value  = model.PDAY;                               //编辑日期
                    parametersH[9].Value  = model.SPERID;                             //登录用户人员-启用
                    parametersH[10].Value = model.PDAY;                               //启用日期-赋值编辑日期
                    parametersH[11].Value = model.REMARKS;                            //备注-暂时未用
                    parametersH[12].Value = model.STATUS;                             //信息状态
                    parametersH[13].Value = SessionBox.GetUserSession().PersonNumber; //历史记录人员
                    parametersH[14].Value = System.DateTime.Today;                    //历史记录日期
                    parametersH[15].Value = "";                                       //历史备注
                    parametersH[16].Value = "禁用";                                     //历史状态
                    OracleHelper.ExecuteSql(strhSql.ToString(), parametersH);
                    #endregion

                    if (OracleHelper.ExecuteSql(strSql.ToString(), parameters) >= 1 && OracleHelper.ExecuteSql(strhSql.ToString(), parametersH) >= 1)
                    {
                        bl = true;
                    }
                    else
                    {
                        bl = false;
                    }
                }
                catch
                {
                    bl = false;
                }
            }
            if (ds.Tables[0].Rows[0]["STATUS"].ToString().Trim() == "禁用")
            {
                bl = false;
            }
            return(bl);
        }
Ejemplo n.º 20
0
    protected void BindOrder()
    {
        string  strWhere = "1=1";
        SF_Role r        = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0]));

        rolelevel  = r.LevelID;
        maindeptid = SessionBox.GetUserSession().DeptNumber;
        switch ((int)rolelevel)
        {
        case 0:

            break;

        case 1:
            strWhere += " and userid != 1";
            break;

        case 2:
            strWhere += " and userid != 1 and DEPTNUMBER=" + SessionBox.GetUserSession().DeptNumber;
            ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber;
            ddlDept.Enabled       = false;
            break;

        default:
            strWhere += " and userid != 1 and DEPTNUMBER=" + SessionBox.GetUserSession().DeptNumber;
            ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber;
            ddlDept.Enabled       = false;
            break;
        }

        if (ddlUserGroup.SelectedValue != "-1")
        {
            strWhere += " and USERGROUPID=" + ddlUserGroup.SelectedValue;
        }
        if (ddlRole.SelectedValue != "-1")
        {
            strWhere += " and ROLENAME like '%" + ddlRole.SelectedItem.Text + "%'";
        }
        if (ddlDept.SelectedValue != "-1")
        {
            strWhere += " and DEPTNUMBER=" + ddlDept.SelectedValue;
        }
        if (ddlKQ.SelectedValue != "-1")
        {
            strWhere += " and DEPTID in (select deptnumber from department start with deptnumber = " + ddlKQ.SelectedValue + " connect by prior deptnumber = fatherid)";
        }
        //if (ddlIsOnline.SelectedValue != "-1")
        //{
        //    strWhere += " and isonline=" + ddlIsOnline.SelectedValue;
        //}
        if (ddlUserStatus.SelectedValue != "-1")
        {
            strWhere += " and userstatus=" + ddlUserStatus.SelectedValue;
        }
        if (txtName.Text.Trim() != "")
        {
            strWhere += " and Name like '%" + txtName.Text.Trim() + "%'";
        }
        if (txtUser.Text.Trim() != "")
        {
            strWhere += " and UserName like '%" + txtUser.Text.Trim() + "%'";
        }
        if (txtPsnNo.Text.Trim() != "")
        {
            strWhere += " and personnumber like '%" + txtPsnNo.Text.Trim() + "%'";
        }
        var ds = bll.GetUserList2(strWhere, " ORDER BY CreateTime DESC");

        ObjectDataSource1.SelectParameters["strWhere"].DefaultValue = strWhere;
        ObjectDataSource1.SelectParameters["strOrder"].DefaultValue = " ORDER BY CreateTime DESC";
        if (ds.Tables[0].Rows.Count == 0)
        {
            GridViewMsg.InnerText = "无记录";
        }
        else
        {
            GridViewMsg.InnerText = "共有" + ds.Tables[0].Rows.Count + "条记录";
        }
        gridUser.DataSourceID = ObjectDataSource1.ID;
        //gvUserList.DataSource = ds;
        gridUser.DataBind();
        gridUser.KeyFieldName = "USERID";
    }
Ejemplo n.º 21
0
    private void baseLoad()
    {
        //绑定部门--没有矿级信息
        var dep = from d in dc.Department
                  where d.Deptnumber != SessionBox.GetUserSession().DeptNumber&& d.Deptnumber.Substring(0, 4) == SessionBox.GetUserSession().DeptNumber.Substring(0, 4) &&
                  d.Deptnumber.Substring(7) == "00"
                  select new
        {
            deptID   = d.Deptnumber,
            deptName = d.Deptname
                       //,
                       //pyall = dc.F_PINYIN(d.Deptname)
        };

        DepartmentSearchStore.DataSource = dep;
        DepartmentSearchStore.DataBind();

        //初始化地点
        var place = from pl in dc.Place
                    where pl.Maindeptid == SessionBox.GetUserSession().DeptNumber
                    select new
        {
            placID   = pl.Placeid,
            placName = pl.Placename
                       //,
                       //pyall = dc.F_PINYIN(pl.Placename)
        };

        PlaceSearchStore.DataSource = place;
        PlaceSearchStore.DataBind();
    }
Ejemplo n.º 22
0
    public void Gridload()
    {
        //绑定工伤信息
        var data = from gs in dc.Workinjury
                   from per in dc.Person
                   from dept in dc.Department
                   // from pos in dc.Post
                   from pl in dc.Place
                   from gslevel in dc.CsBaseinfoset
                   from inper in dc.Person
                   where gs.Personnumber == per.Personnumber && gs.Placeid == pl.Placeid && gs.GsLevelid == gslevel.Infoid && per.Areadeptid == dept.Deptnumber && inper.Personnumber == gs.Inpersonnumber && per.Maindeptid == SessionBox.GetUserSession().DeptNumber
                   select new
        {
            gs.Id,
            per.Name,
            dept.Deptname,
            //   pos.Postname,
            pl.Placename,
            gslevel.Infoname,
            gs.Happendate,
            gs.GsFact,
            gs.PointsPer,
            gs.FinePer,
            gs.PointsDept,
            gs.FineDept,
            inPersonName = inper.Name,
            gs.Indate,
            per.Personnumber,
            gs.Placeid,
            gs.GsLevelid
        };

        if (!df_begin.IsNull && !df_end.IsNull)
        {
            data = data.Where(p => p.Happendate >= df_begin.SelectedDate && p.Happendate <= df_end.SelectedDate);
        }
        if (cbbGsperson.SelectedIndex > -1)
        {
            data = data.Where(p => p.Personnumber == cbbGsperson.SelectedItem.Value);
        }
        if (cbbplace.SelectedIndex > -1)
        {
            data = data.Where(p => p.Placeid == int.Parse(cbbplace.SelectedItem.Value));
        }
        if (gsdj.SelectedIndex > -1)
        {
            data = data.Where(p => p.GsLevelid == int.Parse(gsdj.SelectedItem.Value));
        }
        if (gsss.Text != "")
        {
            data = data.Where(p => p.GsFact.Contains(gsss.Text));
        }

        GSStore.DataSource = data;
        GSStore.DataBind();
    }
Ejemplo n.º 23
0
 public string BaseSave()
 {
     if (df_begin.SelectedValue == null || cbbBc.SelectedIndex == -1 || cbbPerson.SelectedIndex == -1)
     {
         //Ext.Msg.Alert("提示", "请填写完整信息!").Show();
         return("请填写完整信息!");
     }
     if (df_begin.SelectedDate < System.DateTime.Today)
     {
         //Ext.Msg.Alert("提示", "只能制定本日及以后的计划!").Show();
         return("只能制定本日及以后的计划!");
     }
     if (dc.YChargetable.Where(p => p.Cdate == df_begin.SelectedDate && p.Cbanci == cbbBc.SelectedItem.Value && p.Cperson == cbbPerson.SelectedItem.Value).Count() > 0)
     {
         //Ext.Msg.Alert("提示", "已添加的计划!").Show();
         return("已添加的计划!");
     }
     if (cboPlaceTemplate.SelectedIndex <= -1)
     {
         YChargetable ct = new YChargetable
         {
             Recordtime = System.DateTime.Now,
             Rperson    = SessionBox.GetUserSession().PersonNumber,
             Cdate      = df_begin.SelectedDate,
             Cbanci     = cbbBc.SelectedItem.Value,
             Cperson    = cbbPerson.SelectedItem.Value,
             Maindept   = SessionBox.GetUserSession().DeptNumber,
             Status     = 1
         };
         dc.YChargetable.InsertOnSubmit(ct);
         dc.SubmitChanges();
         //RecordAction(ct.Id, "新增");
         //Ext.Msg.Alert("提示", "新增成功!").Show();
         Ext.DoScript("#{Store1}.reload();");
         return("新增成功!");
     }
     else if (cboPlaceTemplate.SelectedItem.Value != "-1")
     {
         HBBLL hb = new HBBLL();
         if (hb.HaveMoveTemplate(int.Parse(cboPlaceTemplate.SelectedItem.Value)) > 0)
         {
             DateTime     dt = System.DateTime.Now;
             YChargetable ct = new YChargetable
             {
                 Recordtime = dt,
                 Rperson    = SessionBox.GetUserSession().PersonNumber,
                 Cdate      = df_begin.SelectedDate,
                 Cbanci     = cbbBc.SelectedItem.Value,
                 Cperson    = cbbPerson.SelectedItem.Value,
                 Maindept   = SessionBox.GetUserSession().DeptNumber,
                 Status     = 1
             };
             dc.YChargetable.InsertOnSubmit(ct);
             dc.SubmitChanges();
             foreach (YPPTDetail pt in hb.GetYPPTDetail(int.Parse(cboPlaceTemplate.SelectedItem.Value), "", SessionBox.GetUserSession().DeptNumber, ""))
             {
                 YPlanplace pp = new YPlanplace
                 {
                     Ctid       = ct.Id,
                     Recordtime = dt,
                     Placeid    = decimal.Parse(pt.PlaceId.ToString()),
                     Moveorder  = decimal.Parse(pt.MoveOrder.ToString())
                 };
                 hb.AddYPlanplace(pp.Recordtime, pp.Placeid, pp.Moveorder.Value, pp.Ctid);
                 //dc.YPlanplace.InsertOnSubmit(pp);
                 //dc.SubmitChanges();
             }
             //RecordAction(ct.Id, "新增");
             //RecordAction(ct.Id, "添加地点");
             //Ext.Msg.Alert("提示", "新增成功!").Show();
             //storeload();
             Ext.DoScript("#{Store1}.reload();");
             return("新增成功!");
         }
         else
         {
             //Ext.Msg.Alert("提示", "请确保模板里有走动线路!").Show();
             return("请确保模板里有走动线路!");
         }
     }
     else
     {
         //Ext.Msg.Alert("提示", "未知错误!").Show();
         return("未知错误!");
     }
 }
Ejemplo n.º 24
0
    private bool SetSWbase(string ID)//加载工伤基本信息
    {
        try
        {
            var data = from gs in dc.Workinjury
                       from per in dc.Person
                       from dept in dc.Department
                       // from pos in dc.Post
                       from pl in dc.Place
                       from gslevel in dc.CsBaseinfoset
                       from inper in dc.Person
                       where gs.Personnumber == per.Personnumber && gs.Placeid == pl.Placeid && gs.GsLevelid == gslevel.Infoid && per.Areadeptid == dept.Deptnumber && inper.Personnumber == gs.Inpersonnumber && per.Maindeptid == SessionBox.GetUserSession().DeptNumber&&  gs.Id.ToString().Trim() == ID
                       select new
            {
                gs.Id,
                per.Name,
                dept.Deptname,
                //   pos.Postname,
                pl.Placename,
                gslevel.Infoname,
                gs.Happendate,
                gs.GsFact,
                gs.PointsPer,
                gs.FinePer,
                gs.PointsDept,
                gs.FineDept,
                inPersonName = inper.Name,
                gs.Indate,
                per.Personnumber,
                gs.Placeid,
                gs.GsLevelid,
                gs.Remarks
            };
            foreach (var gs in data)
            {
                lbl_deptname.Text  = gs.Deptname.ToString();
                lbl_Name.Text      = gs.Name.ToString();
                lbl_ggdj.Text      = gs.Infoname.ToString();
                lbl_ggms.Text      = gs.GsFact.ToString();
                lbl_happydate.Text = gs.Happendate.Value.ToString();
                lbl_place.Text     = gs.Placename.ToString();
                lbl_ygkf.Text      = gs.PointsPer.ToString();
                lbl_kqkf.Text      = gs.PointsDept.ToString();
                lbl_bmfk.Text      = gs.FineDept.ToString();
                lbl_inputname.Text = gs.Indate.ToString();
                lbl_inputname.Text = gs.inPersonName.ToString();
                if (!string.IsNullOrEmpty(gs.Remarks))
                {
                    bz.Text = gs.Remarks;
                }
            }


            return(true);
        }
        catch
        {
            return(false);
        }
    }
Ejemplo n.º 25
0
    private void BaseSet()
    {
        HBBLL hb = new HBBLL();

        var data = hb.GetLeaderRole(SessionBox.GetUserSession().DeptNumber, 431);
        var q    = from p in data
                   select new
        {
            Personnumber = p.personnumber,
            Name         = p.name
        };

        perStore.DataSource = q;
        perStore.DataBind();
        if (SessionBox.GetUserSession().Role.Contains("11,矿级管理员"))
        {
            //cbbPerson.SelectedItem.Value = SessionBox.GetUserSession().PersonNumber;
            if (SessionBox.GetUserSession().Role.Contains("431,副总及以上领导"))
            {
                cbbPerson.SelectedItem.Value = SessionBox.GetUserSession().PersonNumber;
                cbbPerson.Disabled           = false;
            }
            else
            {
                cbbPerson.SelectedIndex = 0;
            }
        }
        else
        {
            cbbPerson.Items.Add(new Coolite.Ext.Web.ListItem(SessionBox.GetUserSession().Name, SessionBox.GetUserSession().PersonNumber));
            cbbPerson.SelectedItem.Value = SessionBox.GetUserSession().PersonNumber;
            cbbPerson.Disabled           = true;
        }
        df_begin.MinDate      = System.DateTime.Today;
        df_begin.SelectedDate = df_begin.MinDate;
        //cx_date.SelectedDate = System.DateTime.Today;
        //var q = from p in dc.Person
        //        where p.Personnumber==SessionBox.GetUserSession().PersonNumber
        //        select new
        //        {
        //            p.Personnumber,
        //            p.Name
        //        };
        //perStore.DataSource = q;
        //perStore.DataBind();


        DeptStore.DataSource = PublicCode.GetMaindept("");
        DeptStore.DataBind();
        if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0"))
        {
            cbbDept.Items.Insert(0, new Coolite.Ext.Web.ListItem("--全部--", "-1"));
            cbbDept.SelectedItem.Value = "-1";
            cbbDept.Disabled           = false;
        }
        else
        {
            cbbDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber;
            cbbDept.Disabled           = true;
        }
        //HBBLL hb = new HBBLL();

        //var data2 = hb.GetYPPT(SessionBox.GetUserSession().PersonNumber, SessionBox.GetUserSession().DeptNumber, "个人");
        //var pt = from r in data2
        //         select new
        //         {
        //             Id = r.Id,
        //             Name = r.Name,
        //             Level = r.TLevel
        //         };
        //placeTemplateStore.DataSource = pt;
        //placeTemplateStore.DataBind();
        //cboPlaceTemplate.Items.Insert(0, new Coolite.Ext.Web.ListItem("--不使用模板--", "-1"));
        cx_date.SelectedValue = DateTime.Today;
    }
Ejemplo n.º 26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!SessionBox.CheckUserSession())
         {
             Response.Redirect("~/Login.aspx");
         }
         else
         {
             SF_Role r = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0]));
             rolelevel  = (int)r.LevelID;
             roledeptid = SessionBox.GetUserSession().DeptNumber;
             if (rolelevel > 1)
             {
                 Session["WhereRole"]      = string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString());
                 Session["WhereUserGroup"] = "usergroupid not in(2,3,23)";
                 Session["maindeptid"]     = SessionBox.GetUserSession().DeptNumber;
                 Session["deptid"]         = SessionBox.GetUserSession().DeptNumber.Remove(4);
             }
             InitData();
         }
     }
 }
Ejemplo n.º 27
0
    private void yy()
    {
        string    oracletext = "select * from HAZARDS where HAZARDSID = " + agvDATA.GetSelectedFieldValues("HAZARDSID")[0].ToString().Trim() + " ";
        DataTable dt         = OracleHelper.Query(oracletext).Tables[0];
        //附属表信息

        StringBuilder strSql1 = new StringBuilder();

        strSql1.Append("insert into HAZARDS_ORE(");
        strSql1.Append("RISK_EVELNUMBER,M_OBJECTNUMBER,M_PERSONNUMBER,DIRECTLYRESPONSIBLEPERSONSNUMB,REGULATORYPARTNERSNUMBER,DATEINPUT,PERSONID,ISPASS,DEPTNUMBER,H_NUMBER)");
        strSql1.Append(" values(");
        strSql1.Append(":RISK_EVELNUMBER,:M_OBJECTNUMBER,:M_PERSONNUMBER,:DIRECTLYRESPONSIBLEPERSONSNUMB,:REGULATORYPARTNERSNUMBER,:DATEINPUT,:PERSONID,:ISPASS,:DEPTNUMBER,:H_NUMBER)");
        OracleParameter[] parameters1 =
        {
            new OracleParameter(":RISK_EVELNUMBER",                OracleType.Number, 9), //风险等级
            new OracleParameter(":M_OBJECTNUMBER",                 OracleType.Number, 9), //管理对象
            new OracleParameter(":M_PERSONNUMBER",                 OracleType.Number, 9), //管理人员
            new OracleParameter(":DIRECTLYRESPONSIBLEPERSONSNUMB", OracleType.Number, 9), //直接责任人

            new OracleParameter(":REGULATORYPARTNERSNUMBER",       OracleType.Number, 9), //监管责任人
            //new OracleParameter(":FREQUENCYNUMBER",OracleType.Number,9),//频率

            //new OracleParameter(":LOSSNUMBER", OracleType.Number,9),//损失
            new OracleParameter(":DATEINPUT",                      OracleType.DateTime),    //录入时间
            //new OracleParameter(":PERSONID", OracleType.Number,9),//录入人
            new OracleParameter(":PERSONID",                       OracleType.VarChar, 20), //录入人
            new OracleParameter(":ISPASS",                         OracleType.VarChar, 10), //状态

            new OracleParameter(":DEPTNUMBER",                     OracleType.VarChar, 30), //引用单位

            new OracleParameter(":H_NUMBER",                       OracleType.VarChar, 100) //编码
        };

        parameters1[0].Value = int.Parse(ASPxComboBox9.SelectedItem.Value.ToString());
        try
        {
            parameters1[1].Value = int.Parse(ASPxComboBox10.SelectedItem.Value.ToString());
        }
        catch { }
        parameters1[2].Value = int.Parse(ASPxComboBox11.SelectedItem.Value.ToString());
        parameters1[3].Value = int.Parse(ASPxComboBox13.SelectedItem.Value.ToString());

        parameters1[4].Value = int.Parse(ASPxComboBox12.SelectedItem.Value.ToString());
        //parameters1[5].Value = int.Parse(ASPxComboBox15.SelectedItem.Value.ToString());

        //parameters1[6].Value = int.Parse(ASPxComboBox16.SelectedItem.Value.ToString());
        parameters1[5].Value = DateTime.Now;
        try
        {
            oracletext           = "select PERSONID from PERSON where PERSONNUMBER = " + SessionBox.GetUserSession().PersonNumber + " ";
            parameters1[6].Value = OracleHelper.GetSingle(oracletext).ToString();
        }
        catch
        {
            parameters1[6].Value = 434;
        }
        parameters1[7].Value = "引用";

        try
        {
            parameters1[8].Value = SessionBox.GetUserSession().DeptNumber;
        }
        catch
        {
            parameters1[8].Value = "000000000";
        }
        parameters1[9].Value = dt.Rows[0]["H_NUMBER"].ToString().Trim();

        OracleHelper.ExecuteSql(strSql1.ToString(), parameters1);
    }
Ejemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["maindeptid"] = SessionBox.GetUserSession().DeptNumber;
     Session["PosDept"]    = SessionBox.GetUserSession().DeptNumber;
 }
Ejemplo n.º 29
0
 protected void btnUpdateClick(object sender, AjaxEventArgs e)
 {
     if (tfYhcontent.Text.Trim() == "" || cbbLevelid.SelectedIndex == -1)
     {
         Ext.Msg.Alert("提示", "请填写完整信息!").Show();
         return;
     }
     try
     {
         if (hdnID.Value.ToString() != "-1")
         {
             var yb = dc.Yhquote.First(p => p.Yhid == decimal.Parse(hdnID.Value.ToString()) && p.Deptnumber == SessionBox.GetUserSession().DeptNumber);
             yb.Levelid = decimal.Parse(cbbLevelid.SelectedItem.Value);
             //yb.Conpyfirst = dc.F_PINYIN(tfYhcontent.Text).ToLower();
             dc.SubmitChanges();
             StoreLoad();
         }
         Ext.Msg.Alert("提示", "更新成功!").Show();
     }
     catch
     {
         Ext.Msg.Alert("提示", "请先引用!").Show();
     }
 }
Ejemplo n.º 30
0
 public void GVLoad(string processid, string kind)
 {
     GhtnTech.SEP.OraclDAL.BaseTableGet btg = new GhtnTech.SEP.OraclDAL.BaseTableGet();
     Hidden1.Value = processid;
     //Hidden2.Value = kind;
     hazardsStore.DataSource = btg.GetHAZARDSForUsingView(" and HAZARDS.PROCESSID='" + processid + "'", SessionBox.GetUserSession().DeptNumber);
     hazardsStore.DataBind();
     GridPanel1.Show();
     Panel1.Hide();
     btn_Save.Disabled   = true;
     btn_yy.Disabled     = true;
     btn_cancel.Disabled = true;
 }