private void IsPower() { DB_OPT dbo = new DB_OPT(); try { UserModel model = new UserDal { UserName = ((UserModel)HttpContext.Current.Session["User"]).UserName }; model.GetModel(dbo); string[] strArray = model.CompanyPower.Split(new char[] { '|' }); for (int i = 0; i < strArray.Length; i++) { strArray[i].Trim(); } } catch (Exception) { } finally { dbo.Close(); } }
private void UpdateUser() { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (((this.txtUserName.Text.Trim() == "") || (this.txtssbmpk.Value.Trim() == "")) || ((this.txtssgspk.Value.Trim() == "") || (this.txtssjspk.Value.Trim() == ""))) { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { string strEditMess = ""; string powerText = this.PowerMenu1.GetPowerText(); string cz = this.PowerCompany1.GetPowerText(); string str4 = this.PowerRow1.GetPowerText(); if ((!PageDo.IsChanged(ref strEditMess, true, this.Page) && (this.txtmenubak.Value == powerText)) && ((this.txtcombak.Value == cz) && (this.txtrowbak.Value == str4))) { Const.ShowMessage("没有修改任何信息,请修改信息后再保存!", this.Page); } else { if (this.txtmenubak.Value != powerText) { string str5 = PowerClass.SubTwoPower(this.txtmenubak.Value, powerText, "|"); string str6 = PowerClass.SubTwoPower(powerText, this.txtmenubak.Value, "|"); string str7 = strEditMess; strEditMess = str7 + "菜单权限去掉了 " + str5 + " 增加了 " + str6; } if (this.txtcombak.Value != cz) { string str8 = Public.DelRelTxt(this.txtcombak.Value, cz, '|'); string str9 = Public.DelRelTxt(cz, this.txtcombak.Value, '|'); string str10 = strEditMess; strEditMess = str10 + "管理范围去掉了 " + str8 + " 增加了 " + str9; } if (this.txtrowbak.Value != str4) { string str11 = Public.DelRelTxt(this.txtrowbak.Value, str4, '|'); string str12 = Public.DelRelTxt(str4, this.txtrowbak.Value, '|'); string str13 = strEditMess; strEditMess = str13 + "数据行权限去掉了 " + str11 + " 增加了 " + str12; } UserModel model = new UserDal { UserPK = base.Request.QueryString["PK"].ToString().Trim() }; model.GetModel(this.dbo); string str14 = PowerClass.SubTwoPower(this.PowerMenu1.GetPower(), this.txtrolepower.Value, "|"); model.Power = str14; string str15 = PowerClass.SubTwoPower(this.PowerCompany1.GetPower(), this.txtcompower.Value, "|"); model.CompanyPower = str15; model.UserName = this.txtUserName.Text.Trim(); model.TrueName = this.txtTrueName.Text.Trim(); model.BranchPK = this.txtssbmpk.Value.Trim(); model.RolePK = this.txtssjspk.Value.Trim(); if (this.txtPwd.Text.Trim() != "") { model.Password = QxRoom.QxConst.QxConst.Encrypt(this.txtPwd.Text.Trim(), "powerich").Trim(); } model.pk_corp = this.txtssgspk.Value.Trim(); Const.UpdateSuccess(model.Update(UserUpdatePowerType.All, UserUpdateIndex.AllowUserPK, this.dbo), this.Page); strEditMess = "用户名为:" + this.txtUserName.Text.Trim() + " 真实姓名为:" + this.txtTrueName.Text.Trim() + " 的用户修改信息:" + strEditMess; OperationLogBll.insertOp("修改", "用户列表", strEditMess, "Y", this.Page); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "UpdateUser()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public static string GetCompanyWhereZB() { UserModel model = (UserModel) HttpContext.Current.Session["User"]; string str = model.Company.pk_corp; string str2 = ""; if ((str != null) && (str.Trim() != "")) { DB_OPT dbo = new DB_OPT(); try { try { dbo.Open(); UserModel model2 = new UserDal { UserName = model.UserName }; model2.GetModel(dbo); string[] strArray = model2.CompanyPower.Split(new char[] { '|' }); string str3 = ""; for (int i = 0; i < strArray.Length; i++) { str3 = str3 + strArray[i].Trim(); if (i < (strArray.Length - 1)) { str3 = str3 + "','"; } } if (str3 != "") { str3 = "'" + str3 + "'"; return (" and ((trim(PD_QUOTA_INPUT_DEPART)='" + model.Branch.BH.Trim() + "' and trim(PD_QUOTA_INPUT_COMPANY)='" + str.Trim() + "') or trim(PD_QUOTA_DEPART) in (" + str3 + ") or (pd_quota_isup=1 and IF_SHOW=1 and company_code='" + str.Trim() + "'))"); } return (" and ((trim(PD_QUOTA_INPUT_DEPART)='" + model.Branch.BH.Trim() + "' and trim(PD_QUOTA_INPUT_COMPANY)='" + str.Trim() + "') or (pd_quota_isup=1 and IF_SHOW=1 and company_code='" + str.Trim() + "'))"); } catch (Exception) { str2 = " and 1=0 "; } return str2; } finally { if (dbo != null) { dbo.Close(); } } } return " and 1=0 "; }
public int ChangePwd(string struser, string strpwd, string strOpwd) { int num; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model.UserName = struser; model.Password = QxRoom.QxConst.QxConst.Encrypt(strOpwd, "powerich"); num = model.UpdatePwd(strpwd, dbo); } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return num; }
public DataSet UserName(string struser) { DataSet list; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model.UserPK = struser; list = model.GetList(" UserPK='" + model.UserPK + "'", dbo); } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return list; }
public int Updateuserinfo(string strUser, string bmpk, string rolepk, string strname, string pk_corp, DB_OPT opt) { int num; UserModel model = new UserDal(); try { model.EmployeePK = strUser; model.UserName = strname; model.BranchPK = bmpk; model.RolePK = rolepk; model.pk_corp = pk_corp; num = model.Update(UserUpdatePowerType.BranchAndRole, UserUpdateIndex.AllowEmployeePK, opt); } catch (Exception exception) { throw exception; } return num; }
public UserModel Login(string struser) { UserModel model; UserModel model2 = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model2.UserName = struser; model2.Login(dbo); ConfigurationModel model3 = new ConfigurationDal().GetModel(dbo); if (model3 != null) { HttpContext.Current.Response.Cookies["ischangelist"].Value = model3.ISCHANGELIST; HttpContext.Current.Session["common"] = model3; if (model3.ErrMessPath != "") { ExceptionLog.ExceptionLog log = new ExceptionLog.ExceptionLog { LogFilePath = model3.ErrMessPath }; } } model = model2; } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return model; }
public int IfHadData(string emppk, DB_OPT dbo) { UserModel model = new UserDal { EmployeePK = emppk }; return model.ExistsByEmpPK(dbo); }
public static void ShowListButton(Page page, out ButtonsModel model, string PD_PROJECT_CODE) { if (HttpContext.Current.Session["User"] == null) { PageShowText.GoLoginPath_List(page); model = null; } else { string userName = ((UserModel) HttpContext.Current.Session["User"]).UserName; model = new ButtonsModel(userName); string str2 = page.Request.Url.ToString(); int startIndex = str2.LastIndexOf("/") + 1; int num2 = str2.LastIndexOf("?"); string path = (num2 < 0) ? str2.Substring(startIndex) : str2.Substring(startIndex, num2 - startIndex); UserModel model2 = new UserDal(); DB_OPT dbo = new DB_OPT(); int isShow = 0; string showtxt = ""; model2.GetServiceCode("ibtcontrol_ibtadd", path, userName, out isShow, out showtxt, dbo); if (isShow == 1) { model.IfAdd = true; if (showtxt != "") { model.IbtAddText = showtxt; } } model2.GetServiceCode("ibtcontrol_ibtdo", path, userName, out isShow, out showtxt, dbo); if (isShow == 1) { model.IfDo = true; if (showtxt != "") { model.IbtDoText = showtxt; } } model2.GetServiceCode("ibtcontrol_ibtdelete", path, userName, out isShow, out showtxt, dbo); if (isShow == 1) { model.IfDelete = true; if (showtxt != "") { model.IbtDeleteText = showtxt; } } } }
public static string ShowBZ_MxButton_IsUP(Page page, out ButtonsModel main_bm, string serverPK, bool isQianShou) { if (HttpContext.Current.Session["User"] == null) { PageShowText.GoLoginPath_List(page); main_bm = null; return null; } string userName = ((UserModel) HttpContext.Current.Session["User"]).UserName; main_bm = new ButtonsModel(userName); string str2 = page.Request.Url.ToString(); int startIndex = str2.LastIndexOf("/") + 1; int num2 = str2.LastIndexOf("?"); string path = (num2 < 0) ? str2.Substring(startIndex) : str2.Substring(startIndex, num2 - startIndex); UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); string showButtonID = ""; string buttonShowTxt = ""; string str6 = ""; string str7 = ""; model.GetServiceStream(path, userName, serverPK, out showButtonID, out buttonShowTxt, out str6, out str7, dbo); if (str7.Trim() != null) { string[] strArray = str7.Split(new char[] { '_' }); if ((strArray.Length == 2) && (int.Parse(strArray[0]) == 1)) { main_bm.IfSave = true; } } if (!isQianShou) { string str8 = showButtonID.Trim(); if (str8 != null) { if (!(str8 == "ibtcontrol_ibtaudit")) { if (str8 == "ibtcontrol_ibtapply") { main_bm.IfApply = true; if (buttonShowTxt != "") { main_bm.IbtApplyText = buttonShowTxt; } else { buttonShowTxt = main_bm.IbtApplyText; } } } else { main_bm.IfAudit = true; if (buttonShowTxt != "") { main_bm.IbtAuditText = buttonShowTxt; } else { buttonShowTxt = main_bm.IbtAuditText; } } } if (str6 != null) { string[] strArray2 = str6.Split(new char[] { '_' }); if (strArray2.Length != 2) { return buttonShowTxt; } if (int.Parse(strArray2[0]) == 1) { main_bm.IfSetBack = true; } if (int.Parse(strArray2[1]) == 1) { main_bm.IfRollBack = true; } } } return buttonShowTxt; }
public static string SetServiceStream(Page pages, int operation, string tableName, string IdName, string IdValue, string Mess, string PD_NOW_SERVERPK_NAME) { UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); string newServerPK = ""; TB_PROJECT_Bll bll = new TB_PROJECT_Bll(); string str3 = pages.Request.Url.ToString(); int startIndex = str3.LastIndexOf("/") + 1; int num2 = str3.LastIndexOf("?"); string path = (num2 < 0) ? str3.Substring(startIndex) : str3.Substring(startIndex, num2 - startIndex); UserModel model2 = (UserModel) pages.Session["User"]; string userName = model2.UserName; string userCompany = pages.Session["pk_corp"].ToString(); string bH = model2.Branch.BH; string userDate = DateTime.Now.ToString("yyyy-MM-dd"); string serverPK = bll.GetServerPK(tableName, IdName, IdValue, PD_NOW_SERVERPK_NAME); model.SetServiceStream(path, IdValue, userName, userCompany, bH, userDate, serverPK, operation, out newServerPK, dbo); if (bll.UpdateServerPK(tableName, IdName, IdValue, newServerPK, PD_NOW_SERVERPK_NAME)) { if (Mess != null) { PageShowText.Refurbish(Mess + "成功", pages); } return newServerPK; } if (Mess != null) { PageShowText.Refurbish(Mess + "失败", pages); } return newServerPK; }
public static string SetCreateServiceStream(Page pages, string Url) { UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); string newServerPK = ""; UserModel model2 = (UserModel) pages.Session["User"]; string userName = model2.UserName; string userCompany = pages.Session["pk_corp"].ToString(); string bH = model2.Branch.BH; string userDate = DateTime.Now.ToString("yyyy-MM-dd"); model.SetServiceStream(Url, "", userName, userCompany, bH, userDate, "", 0, out newServerPK, dbo); return newServerPK; }
public static string SetCreateServiceStream(Page pages) { UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); string newServerPK = ""; new TB_PROJECT_Bll(); string str2 = pages.Request.Url.ToString(); int startIndex = str2.LastIndexOf("/") + 1; int num2 = str2.LastIndexOf("?"); string path = (num2 < 0) ? str2.Substring(startIndex) : str2.Substring(startIndex, num2 - startIndex); UserModel model2 = (UserModel) pages.Session["User"]; string userName = model2.UserName; string userCompany = pages.Session["pk_corp"].ToString(); string bH = model2.Branch.BH; string userDate = DateTime.Now.ToString("yyyy-MM-dd"); model.SetServiceStream(path, "", userName, userCompany, bH, userDate, "", 0, out newServerPK, dbo); return newServerPK; }
public static void GetUpDownStream(Page page, string serverPK, int operation, out string NewServerPK) { string str = page.Request.Url.ToString(); int startIndex = str.LastIndexOf("/") + 1; int num2 = str.LastIndexOf("?"); string path = (num2 < 0) ? str.Substring(startIndex) : str.Substring(startIndex, num2 - startIndex); UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); model.GetUpDownStream(path, serverPK, operation, out NewServerPK, dbo); }
protected void Page_Load(object sender, EventArgs e) { if (base.Request.QueryString["tn"] != null) { UsualBookTable table = new UsualBookTable(); string str = base.Request.QueryString["tn"]; try { string companyPower; string str6; this.dbo = new DB_OPT(); this.dbo.Open(); switch (str) { case "ContractName": { table.PageTitle = "合同信息参照"; table.TableName = "PD_Project_Contract"; table.Columns = "PD_Contract_No as PK,PD_CONTRACT_NAME as 合同名称,'','','',''"; UserModel model = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model.GetModel(this.dbo); companyPower = model.CompanyPower; goto Label_3001; } case "SubjectKind": table.PageTitle = "项目类别参照"; table.TableName = "SubjectKind"; table.Columns = "PK as PK,Name as 项目类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "Custom": table.PageTitle = "客户参照"; table.TableName = "Custom"; table.Columns = "CusPK as PK,CustomName as 客户名称,City as 城市,Address as 地址,0,'',0,''"; goto Label_30B8; case "Linkman": if ((base.Request.QueryString["cuspk"] != null) && (base.Request.QueryString["cuspk"] != "")) { table.StrWhere = "CusPK='" + base.Request.QueryString["cuspk"].ToString() + "'"; } table.PageTitle = "联系人参照"; table.TableName = "Linkman"; table.Columns = "LMPK as PK,Name as 联系人名称,Sex as 性别,Age as 年龄,OfficePhone as 办公电话,0,'',0,''"; goto Label_30B8; case "Employee": table.PageTitle = "员工参照"; table.TableName = "DB_Employee"; table.Columns = " EmployeePK as PK,Name as 员工名称,Grade as 等级,FatherPK,IsHasBaby,PKPath "; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = " pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "ContratKind": table.PageTitle = "合同类别参照"; table.TableName = "ContratKind"; table.Columns = "PK as PK,Name as 合同类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "ContractsMessage": table.PageTitle = "合同信息参照"; table.TableName = "pd_project_contract"; table.Columns = "pd_contract_no as PK,pd_contract_name as 合同名称,pd_contract_company||','||pd_contract_moeny,0,'',0,''"; table.StrWhere = " pd_project_code='" + base.Request.QueryString["project_code"].ToString() + "' and PD_CONTRACT_TYPE='" + base.Request["CONTRACTTYPE"].Trim() + "'"; goto Label_30B8; case "Subject": if ((base.Request.QueryString["cuspk"] != null) && (base.Request.QueryString["cuspk"] != "")) { table.StrWhere = "ContratPK='" + base.Request.QueryString["cuspk"].ToString() + "'"; } table.PageTitle = "合同主信息参照"; table.TableName = "Subject"; table.Columns = "SubPK as PK,ReduceName as 项目名称,0,'',0,''"; goto Label_30B8; case "Product": table.PageTitle = "物品信息参照"; table.TableName = "Product"; table.Columns = "ProPK as PK,ProductName as 物品名称,0,'',0,''"; goto Label_30B8; case "ContratPayItem": table.PageTitle = "佣金支付条款参照"; table.TableName = "ContratPayItem"; table.Columns = "ItemPK as PK,Content as 合同名称,0,'',0,''"; goto Label_30B8; case "Branch": table.PageTitle = "部门参照"; table.TableName = "DB_Branch"; table.Columns = "BranchPK as PK,Name as 部门名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = "pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "Menu": table.PageTitle = "菜单信息参照"; table.TableName = "DB_Menu"; table.Columns = "MemuPK as PK,MenuName as 菜单名称,Grade as 等级, FatherPK, IsHasBaby,''"; table.Grade = 0; goto Label_30B8; case "Branch_BH": table.PageTitle = "部门参照"; table.TableName = "DB_Branch"; table.Columns = "BH as PK,Name as 部门名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = "pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } table.Grade = 0; goto Label_30B8; case "Role": table.PageTitle = "角色参照"; table.TableName = "DB_Role"; table.Columns = "RolePK as PK,Name as 角色名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 0; table.StrWhere = table.StrWhere + " 1=1 "; if ((base.Request.QueryString["pk_corp"] != null) && (base.Request.QueryString["pk_corp"] != "")) { table.StrWhere = table.StrWhere + " and pk_corp='" + base.Request.QueryString["pk_corp"].ToString() + "'"; } if ((base.Request.QueryString["branchpk"] != null) && (base.Request.QueryString["branchpk"] != "")) { table.StrWhere = table.StrWhere + " and BranchPK='" + base.Request.QueryString["branchpk"].ToString() + "'"; } goto Label_30B8; case "CustomKind": table.PageTitle = "客户类别参照"; table.TableName = "CustomKind"; table.Columns = "PK as PK,Name as 客户类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "PayType": table.PageTitle = "付款方式参照"; table.TableName = "PayType"; table.Columns = "PK as PK,Name as 付款方式,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "ContratPickUp": table.PageTitle = "合同提成参照"; table.TableName = "ContratPickUp"; table.Columns = "PUPK as PK,Content as 提成内容,0,'',0,''"; goto Label_30B8; case "HeTongBH": table.PageTitle = "合同编号参照"; table.TableName = "PD_PROJECT_CONTRACT"; table.StrWhere = "trim(PD_PROJECT_CODE)='" + base.Request["PD_PROJECT_CODE"].Trim() + "'"; table.Columns = "PD_CONTRACT_NO as PK,PD_CONTRACT_NO||' '||PD_CONTRACT_NAME 合同编号与名称,PD_CONTRACT_MOENY_CHANGE||'~'||PD_CONTRACT_NAME,'',0,''"; goto Label_30B8; case "XiangZhen": { table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = " ZXBJ!=1 "; if ((base.Request.QueryString["UsersPk"] == null) || !(base.Server.UrlDecode(base.Request.QueryString["UsersPK"]).Trim() != "")) { goto Label_30B8; } companyPower = ""; if (HttpContext.Current.Session["User"] != null) { goto Label_2FDD; } UserModel model2 = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model2.GetModel(this.dbo); companyPower = model2.CompanyPower; goto Label_3001; } case "Users": { table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; if ((base.Request.QueryString["UsersPk"] == null) || !(base.Server.UrlDecode(base.Request.QueryString["UsersPK"]).Trim() != "")) { goto Label_30B8; } companyPower = ""; if (HttpContext.Current.Session["User"] != null) { goto Label_2FDD; } UserModel model3 = new UserDal { UserName = base.Request.QueryString["UsersPK"] }; model3.GetModel(this.dbo); companyPower = model3.CompanyPower; goto Label_3001; } case "company": table.PageTitle = "单位信息参照"; table.TableName = "DB_company"; table.Columns = "pk_corp as PK,Name as 单位名称,0,'',0,''"; goto Label_30B8; case "Company": table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,Grade as 等级, FatherPK, IsHasBaby,''"; table.Grade = 0; goto Label_30B8; case "proj_pfwh": { string str3 = base.Request["proj"]; table.PageTitle = "上级指标文号参照"; table.TableName = "tb_quota"; if ((base.Request["loop"] != null) && (base.Request["loop"] == "1")) { table.StrWhere = " pd_project_code='" + str3 + "'"; } table.Columns = " pd_quota_code as PK,pd_quota_code||' '||pd_quota_name as pfwh,'','',''"; goto Label_30B8; } case "proj_bzwh": table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quota"; table.StrWhere = " 1=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } table.Columns = " pd_quota_zbwh as PK,ShowText as 指标文号,pd_up_money,'',''"; goto Label_30B8; case "ProjectBXK": { UserModel model4 = (UserModel)this.Session["User"]; table.PageTitle = "项目备选库"; table.TableName = "v_selectProjectCS"; table.StrWhere = " 1=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and trim(PD_FOUND_XZ)='" + base.Request["xz"].Trim() + "'"; } table.StrWhere = table.StrWhere + " and trim(pk_corp)='" + model4.Company.pk_corp.Trim() + "'"; table.StrWhere = table.StrWhere + " and trim(bh)='" + model4.Branch.BH.Trim() + "'"; table.StrWhere = table.StrWhere + " and pd_project_isbxk=1"; table.Columns = " pd_project_code as PK,pd_project_name as 项目名称,'','','' "; goto Label_30B8; } case "open_pd_quotaAddMoney": { UserModel model5 = (UserModel)this.Session["User"]; table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quotaAddMoney"; table.StrWhere = " if_show=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } if (base.Request["company_code"] != null) { table.StrWhere = table.StrWhere + " and trim(company_code)='" + model5.Company.pk_corp.Trim() + "'"; } table.Columns = " pd_quota_code as PK,ShowText as 指标文号,pd_up_money||'~'||PD_QUOTA_DEPART||'~'||PD_QUOTA_DEPART_NAME||'~'||PD_QUOTA_BASIS_JG||'~'||PD_QUOTA_ZJLY||'~'||PD_QUOTA_ZGKJ,'',''"; goto Label_30B8; } case "pd_DuoZhiBiao": break; case "ZhiBiaoJYK": table.PageTitle = "上级指标文号参照"; table.TableName = "v_quota_JieYuZB"; table.StrWhere = " PD_QUOTA_MONEY_TOTAL-sumPD_QUOTA_ZBXDZH>0 and trim(pd_quota_input_depart)='" + base.Request.Params["branch"].Trim() + "'"; table.Columns = " Minpd_quota_code as PK,PD_QUOTA_ZBWH as 指标文号,PD_QUOTA_MONEY_TOTAL||'~'||sumPD_QUOTA_ZBXDZH||'~'||pd_quota_pici,'',''"; goto Label_30B8; case "proj_bianma": table.PageTitle = "项目参照"; table.TableName = "V_PROJECTADDQUOTA"; table.Columns = "pd_project_code as PK,pd_project_name||'-'||村名 as 项目名称,pd_project_gnfl||','||pd_project_jjfl||','||PD_PROJECT_MONEY_TOTAL||','||PD_QUOTA_JJLX||','||PD_QUOTA_GLLX,0,'',0,''"; table.StrWhere = " 1=1 "; if (base.Request.Params["year"] != null) { string strWhere = table.StrWhere; table.StrWhere = strWhere + " and pd_year=" + base.Request["year"].Trim() + " and pd_project_input_company=" + ((UserModel)this.Session["user"]).Company.pk_corp; } if (base.Request.Params["pd_found_xz"] != null) { table.StrWhere = table.StrWhere + " and pd_found_xz='" + base.Request["pd_found_xz"].Trim() + "'"; } table.StrWhere = table.StrWhere + " and nvl(PD_PROJECT_ISBXK,0)=0 "; goto Label_30B8; case "proj_bianma3": { UserModel model7 = (UserModel)this.Session["User"]; string str4 = "1=0"; if (model7 != null) { str4 = base.Request.QueryString["tn"]; } str4 = ("trim(pd_project_input_company)='" + model7.Company.pk_corp.Trim() + "'") + " and PD_FOUND_XZ='" + base.Request["PD_FOUND_XZ"] + "' and nvl(PD_PROJECT_ISBXK,0)=0 "; table.PageTitle = "项目参照"; table.TableName = "v_tb_project_PD_FOUND_OUT"; table.StrWhere = str4; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,PD_PROJECT_MONEY_TOTAL||','||PD_PROJECT_MONEY_CZ_TOTAL,0,'',0,''"; goto Label_30B8; } case "proj_bianma2": { UserModel model8 = (UserModel)this.Session["User"]; string str5 = "1=0"; if (model8 != null) { str5 = "trim(pd_project_input_company)='" + model8.Company.pk_corp.Trim() + "'"; } string str9 = str5; str5 = str9 + " and pd_year=" + base.Request["pd_year"] + " and PD_FOUND_XZ='" + base.Request["ProjectType"] + "' and nvl(PD_PROJECT_ISBXK,0)=0 "; table.PageTitle = "项目参照"; table.TableName = "v_tb_project_PD_FOUND_OUT"; table.StrWhere = str5; table.Columns = "pd_project_code as PK,pd_project_name||'-'||村名 as 项目名称,PD_PROJECT_MONEY_TOTAL||','||PD_PROJECT_MONEY_CZ_TOTAL,0,'',0,''"; goto Label_30B8; } case "proj_bianma1": table.PageTitle = "项目参照"; table.TableName = "tb_project"; str6 = ""; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,pd_project_gnfl||','||pd_project_jjfl,0,'',0,''"; if (!(((UserModel)this.Session["user"]).Company.IsHasBaby == "1")) { goto Label_1813; } str6 = " pd_year=" + base.Request.Params["year"].Trim() + " and pd_project_input_company in(select pk_corp from db_company where fatherpk='" + ((UserModel)this.Session["user"]).Company.pk_corp + "')"; goto Label_1880; case "PublicReport": table.PageTitle = "参照"; table.TableName = base.Request["tb"]; table.Columns = base.Request["column"] + ",'','','',''"; table.StrWhere = base.Request["where"].Replace('"', '\''); goto Label_30B8; case "GoodsKind": table.PageTitle = "物品类别参照"; table.TableName = "GoodsKind"; table.Columns = "PK as PK,Name as 物品类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_YWLB": table.PageTitle = "业务类别参照"; table.TableName = "GOV_TC_DB_YWLB"; table.Columns = "PK as PK,Name as 业务类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; table.ShowSelect = 1; if (base.Request.QueryString["YWBH"] != null) { table.StrWhere = "PKPath like '%" + base.Request.QueryString["YWBH"].ToString() + "%' and StartSign='1'"; } goto Label_30B8; case "gov_tc_db_ywlb": table.PageTitle = "业务类别参照"; table.TableName = "GOV_TC_DB_YWLB"; table.Columns = "PK as PK,Name as 业务类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_ServicesRegister": table.PageTitle = "系统注册服务参照"; table.TableName = "GOV_TC_DB_ServicesRegister"; table.Columns = "PK as PK,Name as 注册服务名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.StrWhere = "StartSign='1'"; table.Grade = 0; if (base.Request.QueryString["showselect"] != null) { table.ShowSelect = int.Parse(base.Request.QueryString["showselect"].ToString()); } goto Label_30B8; case "GOV_TC_DB_ServicesMess_nbgl": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; table.StrWhere = table.StrWhere + " and patindex('%|'||rtrim(ServiceTypePK)||'|%','|6|12|13|')>0"; } goto Label_30B8; case "GOV_TC_DB_ServicesMess_jzjznbgl": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; table.StrWhere = table.StrWhere + " and patindex('%|'||rtrim(ServiceTypePK)||'|%','|18|19|13|')>0"; } goto Label_30B8; case "GOV_TC_DB_ServicesMess": table.PageTitle = "系统已配置的服务参照"; table.TableName = "GOV_TC_DB_ServicesMess"; table.Columns = "PK as PK,Name as 配置服务名称,0,'',0,''"; if (base.Request.QueryString["pk_corp"] != null) { table.StrWhere = table.StrWhere + "CompanyPK='" + base.Request.QueryString["pk_corp"].ToString() + "'"; if (base.Request.QueryString["servicetype"] != null) { table.StrWhere = table.StrWhere + " and ServiceTypePK='" + base.Request.QueryString["servicetype"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_UNITTYPE": table.PageTitle = "计算单位类型"; table.TableName = "GOV_TC_DB_UNITTYPE"; table.Columns = "PK as PK,Name as 计算单位类型,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_FKFS": table.PageTitle = "付款方式参照"; table.TableName = "GOV_TC_DB_FKFS"; table.Columns = "PK as PK,Name as 单位类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_TaxFeeKind_PK": table.PageTitle = "模块权限参照"; table.TableName = "GOV_TC_DB_TaxFeeKind"; table.Columns = "PK as PK,Name as 税费类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_TaxFeeKind": table.PageTitle = "税费类别参照"; table.TableName = "GOV_TC_DB_TaxFeeKind"; table.Columns = "BH as 编号,Name as 税费类别,Grade as 等级,FatherPK,IsHasBaby,PKPath"; goto Label_30B8; case "gov_tc_db_ServicesType": table.PageTitle = "服务类型参照"; table.TableName = "gov_tc_db_ServicesType"; table.Columns = "BH as PK,Name as 服务类型,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_PapersInfo": table.PageTitle = "证件档案参照"; table.TableName = "GOV_TC_DB_PapersInfo"; table.Columns = "PK as PK,Name as 证件名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_Metering": table.PageTitle = "计量计价类别参照"; table.TableName = "GOV_TC_DB_Metering"; table.Columns = "PK as PK,Name as 计量计价名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] != null) && (base.Request["PARALLELISMTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["FSTABLE"] != null) && (base.Request["FSTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "' or PARALLELISMTABLE='" + base.Request["FSTABLE"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_CollectObject": table.PageTitle = "征收对象参照"; table.TableName = "GOV_TC_DB_CollectObject"; table.Columns = "PK as PK,Name as 征收对象名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] != null) && (base.Request["PARALLELISMTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["FSTABLE"] != null) && (base.Request["FSTABLE"].ToString() != "")) { table.StrWhere = "PARALLELISMTABLE='" + base.Request["PARALLELISMTABLE"].ToString() + "' or PARALLELISMTABLE='" + base.Request["FSTABLE"].ToString() + "'"; } } goto Label_30B8; case "GOV_TC_DB_OprateTache": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_DB_OprateTache"; table.Columns = "PK as PK,Name as 环节名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_OprateTacheBH": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_DB_OprateTache"; table.Columns = "OPRATEORDER as PK,Name as 环节名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_OprateTache_Added": table.PageTitle = "业务环节参照"; table.TableName = "GOV_TC_VIEW_SFPROCOUNTSTANDARD"; table.Columns = "distinct TACHEPK as PK,TACHE as 环节名称,0,'',0,''"; table.StrWhere = "COMPANYPK='" + this.Session["pk_corp"].ToString() + "' and TACHETYPE='11'"; goto Label_30B8; case "DB_DataTable": table.PageTitle = "数据字典——表参照"; table.TableName = "DB_DataTable"; table.Columns = "PK || '|' || TABLENAME as PK,TableRemark as 表名称,0,'',0,''"; goto Label_30B8; case "DB_DataColumn": table.PageTitle = "数据字典——列参照"; table.TableName = "DB_DataColumn"; table.Columns = "PK || '|' || COLUMNNAME as PK,COLUMNREMARK as 列名称,0,'',0,''"; if ((base.Request["PARALLELISMTABLE"] == null) || !(base.Request["PARALLELISMTABLE"].ToString() != "")) { goto Label_305B; } table.StrWhere = "TABLEPK='" + base.Request["PARALLELISMTABLE"].ToString() + "'"; if ((base.Request["TABLEPK"] != null) && (base.Request["TABLEPK"].ToString() != "")) { table.StrWhere = "TABLEPK='" + base.Request["PARALLELISMTABLE"].ToString() + "' or TABLEPK " + base.Request["TABLEPK"].ToString(); } goto Label_30B8; case "GOV_TC_DB_HouseCompany": table.PageTitle = "建设单位档案参照"; table.TableName = "GOV_TC_DB_HouseCompany"; table.Columns = "PK || '|' || LegalMan || '|' || LinkType || '|' || RegisterAddress as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = "ISPASS='******'"; goto Label_30B8; case "GOV_TC_DB_BuildingCompany": table.PageTitle = "施工单位档案参照"; table.TableName = "GOV_TC_DB_BuildingCompany"; table.Columns = "PK || '|' || LegalMan || '|' || LinkType || '|' || RegisterAddress as PK,Name as 单位名称,0,'',0,''"; table.StrWhere = "ISPASS='******'"; goto Label_30B8; case "GOV_TC_VIEW_SOILMESS": table.PageTitle = "土地档案参照"; table.TableName = "GOV_TC_DB_SOILDOCUMENT"; table.Columns = "PK||'|'||SOILSUBNUM||'|'||SOILAREA||'|'||SOILPLACE||'|'||SOILNUM as PK,SOILSUBNUM as 土地成交确认书号, Grade as 等级, FatherPK, IsHasBaby,''"; table.StrWhere = "ISPASS='******'"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_BuildProjectDocument": table.PageTitle = "建设项目档案参照"; table.TableName = "GOV_TC_VIEW_BUILDPROJECTDOC"; table.StrWhere = "ISPASS='******'"; table.Columns = "PK||'|'||ProjectName||'|'||HouseUnitHolder||'|'||HouseUnitHolderPhone||'|'||BuildAddress||'|'||SOILDOCPK||'|'||SOILSUBNUM||'|'||SOILNUM as PK,ProjectName as 项目信息, Grade as 等级, FatherPK, IsHasBaby,''"; if ((base.Request["type"] != null) && (base.Request["type"].ToString() != "")) { table.StrWhere = "ISPASS='******' and (type='" + base.Request["type"].ToString() + "' or type is null)"; } table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_BuildProjectDocument_jzs": table.PageTitle = "建设项目档案参照"; table.TableName = "GOV_TC_DB_BuildProjectDocument"; table.Columns = "PK || '|' || BuildUnitHolder || '|' || BuildUnitHolderPhone || '|' || BuildAddress as PK,ProjectName as 建设项目名称, Grade as 等级, FatherPK, IsHasBaby, ''"; table.StrWhere = "ISPASS='******'"; table.Grade = 0; goto Label_30B8; case "GOV_TC_DB_ISHESHICHAJIA": table.PageTitle = "能否核实差价性质档案参照"; table.TableName = "GOV_TC_DB_ISHESHICHAJIA"; table.Columns = "PK as PK,Name as 核实性质,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_JZXZ": table.PageTitle = "建筑结构档案参照"; table.TableName = "GOV_TC_DB_JZXZ"; table.Columns = "PK as PK,Name as 建筑用途,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_PROJECTKIND": table.PageTitle = "项目性质档案参照"; table.TableName = "GOV_TC_DB_PROJECTKIND"; table.Columns = "PK as PK,Name as 项目性质,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_PAPER_BUILDSOILUSEPLAN": table.PageTitle = "建设用地规划许可证参照"; table.TableName = "GOV_TC_PAPER_BUILDSOILUSEPLAN"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROCOPY": table.PageTitle = "建设工程规划许可证副本参照"; table.TableName = "GOV_TC_PAPER_BUILDPROCOPY"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROJECTPLAN": table.PageTitle = "建设工程规划许可证正本参照"; table.TableName = "GOV_TC_PAPER_BUILDPROJECTPLAN"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_PAPER_BUILDPROCST": table.PageTitle = "建筑工程施工许可证参照"; table.TableName = "GOV_TC_PAPER_BUILDPROCST"; table.Columns = "PK as PK,BH as 证件编号,0,'',0,''"; if ((base.Request.QueryString["ProjectPK"] != null) && (base.Request.QueryString["ProjectPK"] != "")) { table.StrWhere = table.StrWhere + " PROJECTPK='" + base.Request.QueryString["ProjectPK"].ToString().Trim() + "'"; } goto Label_30B8; case "GOV_TC_DB_STREET": table.PageTitle = "路段档案"; table.TableName = "GOV_TC_DB_STREET"; table.Columns = "PK as PK,Name as 路段名称,Grade as 等级,FatherPK,IsHasBaby,PKPath"; table.Grade = 1; goto Label_30B8; case "GOV_TC_DB_LDJG_HOUSE": table.PageTitle = "路段价格限制-房产"; table.TableName = "GOV_TC_DB_LDJG_HOUSE"; table.Columns = "PK || '|' || ZFMINVALUE || '|' || FZFMINVALUE as PK,TYPE||'-'||TNAME||'-'||QYFW as 路段名称,0,'',0,''"; goto Label_30B8; case "GOV_TC_DB_LDJG_SOIL": table.PageTitle = "路段价格限制-土地"; table.TableName = "GOV_TC_DB_LDJG_SOIL"; table.Columns = "PK || '|' || ZFMINVALUE || '|' || FZFMINVALUE as PK,TYPE||'-'||TNAME||'-'||QYFW as 路段名称,0,'',0,''"; goto Label_30B8; case "FG": table.PageTitle = "政策法规信息参照"; table.TableName = "PD_PROJECT_REGULATE"; table.Columns = "PD_PROJECT_CODE as PK,PD_PROJECT_SUBJECTS as 标题,0,'',0,''"; goto Label_30B8; case "GLLX": table.PageTitle = "支出功能信息参照"; table.TableName = "GL_Fzxzl"; table.Columns = "fzdm as PK,trim(fzdm)||'-'||fzmc as 标题,0,'',0,''"; table.StrWhere = " lbdm='4' and SFMX='1' and substr(fzdm,1,1)='2'and trim(gsdm)='" + base.Request["ye"].ToString() + "' order by fzdm"; goto Label_30B8; case "JJLX": table.PageTitle = "支出经济信息参照"; table.TableName = "GL_Fzxzl"; table.Columns = "fzdm as PK,trim(fzdm)||'-'||fzmc as 标题,0,'',0,''"; table.StrWhere = " lbdm='5'and length(trim(fzdm))=3 and trim(gsdm)='" + base.Request["ye"].ToString() + "' order by fzdm"; goto Label_30B8; case "PROJECT": table.PageTitle = "项目信息参照"; table.TableName = "tb_project"; table.Columns = "pd_project_code as PK,pd_project_name as 项目名称,0,'',0,''"; goto Label_30B8; case "INSPECTION_BTFFID": table.PageTitle = "补贴发放信息参照"; table.TableName = "PD_PROJECT_BZFFLIST"; table.Columns = "AUTO_NO as PK,PD_BZFFLIST_PEASANT_NAME||PD_BZFFLIST_IDNO as 项目名称,0,'',0,''"; goto Label_30B8; case "mssql_kjkm": table.PageTitle = "会计科目"; table.TableName = "GL_Kmxx"; table.Columns = "kmdm as PK,kmmc as 项目名称,0,'',0,''"; table.StrWhere = " gsdm='' "; goto Label_30B8; case "mssql_fzhs": table.PageTitle = "辅助核算项目"; table.TableName = "GL_Xmzl"; table.Columns = "xmdm as PK,xmmc as 项目名称,0,'',0,''"; table.StrWhere = " gsdm='' "; goto Label_30B8; case "pd_base_kaopingtype": table.PageTitle = "工作考评大类"; table.TableName = "pd_base_kaopingtype"; table.Columns = "auto_id as PK, khtypename as 考核大类 ,0,'',0,''"; goto Label_30B8; default: goto Label_30B8; } UserModel model6 = (UserModel)this.Session["User"]; table.PageTitle = "上级指标文号参照"; table.TableName = "open_pd_quotaAddMoney"; table.StrWhere = " if_show=1 "; if (base.Request.Params["xz"] != null) { table.StrWhere = table.StrWhere + " and PD_QUOTA_ZJXZ='" + base.Request.Params["xz"].Trim() + "'"; } if ((base.Request.Params["TZJGC"] != null) && PublicDal.PageValidate.IsInt(base.Request.Params["TZJGC"])) { switch (int.Parse(base.Request.Params["TZJGC"])) { case 1: table.StrWhere = table.StrWhere + " and PD_QUOTA_LWJG<=2 "; break; case 2: table.StrWhere = table.StrWhere + " and PD_QUOTA_LWJG=3 "; break; } } if (base.Request["company_code"] != null) { table.StrWhere = table.StrWhere + " and trim(company_code)='" + model6.Company.pk_corp.Trim() + "'"; } table.Columns = " pd_quota_code as PK,ShowText as 指标文号,pd_up_money||'~'||PD_QUOTA_DEPART||'~'||PD_QUOTA_DEPART_NAME||'~'||PD_QUOTA_BASIS_JG||'~'||PD_QUOTA_ZJLY_NAME||'~'||PD_QUOTA_ZGKJ_NAME,'',''"; goto Label_30B8; Label_1813: ; str6 = " pd_year=" + base.Request.Params["year"].Trim() + " and pd_project_input_company='" + ((UserModel)this.Session["user"]).Company.pk_corp + "'"; Label_1880: if ((base.Request.Params["xz"] != null) && (base.Request.Params["xz"].Trim() != "0")) { str6 = str6 + " and pd_found_xz='" + base.Request.Params["xz"].Trim() + "'"; } table.StrWhere = str6; goto Label_30B8; Label_2FDD: companyPower = PowerClass.GetPowerString(((UserModel)HttpContext.Current.Session["User"]).CompanyPower); Label_3001: table.PageTitle = "单位信息参照"; table.TableName = "DB_Company"; table.Columns = "pk_corp as PK,Name as 单位名称,'',0,''"; if (base.Request.QueryString["UsersPK"] != "admin") { table.StrWhere = "pk_corp in (" + companyPower + ")"; } goto Label_30B8; Label_305B: if ((base.Request["TABLEPK"] != null) && (base.Request["TABLEPK"].ToString() != "")) { table.StrWhere = "TABLEPK ='" + base.Request["TABLEPK"].ToString() + "'"; } Label_30B8: this.Session["UsualBookTable"] = table; } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "Page_Load()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("获取数据失败,请联系系统管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } } }
public string deleteuserinfo(string strUser, Page page) { string str2; string str = ""; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model.UserPK = strUser; model.GetModel(dbo); if (model.UserName == "admin") { return "admin"; } model.Delete(dbo); OperationLogBll.insertOp("删除", "用户列表", "删除 " + model.cName + " 单位, " + model.bName + "部门下用户名为:" + model.UserName + " 真实姓名为:" + model.TrueName + " 的用户", "Y", page); str2 = str; } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return str2; }
public static string ShowMxButton(Page page, out ButtonsModel main_bm, string tableName, string IdName, string IdValue, string PD_NOW_SERVERPK_NAME) { if (HttpContext.Current.Session["User"] == null) { PageShowText.GoLoginPath_List(page); main_bm = null; return null; } string userName = ((UserModel) HttpContext.Current.Session["User"]).UserName; main_bm = new ButtonsModel(userName); string mainServerPK = ""; if ((IdValue != null) && (IdValue.Trim() != "")) { mainServerPK = new TB_PROJECT_Bll().GetServerPK(tableName, IdName, IdValue, PD_NOW_SERVERPK_NAME); } else { main_bm.IfSave = true; return "新建"; } string str3 = page.Request.Url.ToString(); int startIndex = str3.LastIndexOf("/") + 1; int num2 = str3.LastIndexOf("?"); string path = (num2 < 0) ? str3.Substring(startIndex) : str3.Substring(startIndex, num2 - startIndex); UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); string showButtonID = ""; string buttonShowTxt = ""; string str7 = ""; string str8 = ""; model.GetServiceStream(path, userName, mainServerPK, out showButtonID, out buttonShowTxt, out str7, out str8, dbo); string str9 = showButtonID.Trim(); if (str9 != null) { if (!(str9 == "ibtcontrol_ibtaudit")) { if (str9 == "ibtcontrol_ibtapply") { main_bm.IfApply = true; if (buttonShowTxt != "") { main_bm.IbtApplyText = buttonShowTxt; } } } else { main_bm.IfAudit = true; if (buttonShowTxt != "") { main_bm.IbtAuditText = buttonShowTxt; } } } if (str8.Trim() != null) { string[] strArray = str8.Split(new char[] { '_' }); if ((strArray.Length == 2) && (int.Parse(strArray[0]) == 1)) { main_bm.IfSave = true; } } if (str7 != null) { string[] strArray2 = str7.Split(new char[] { '_' }); if (strArray2.Length != 2) { return buttonShowTxt; } if (int.Parse(strArray2[0]) == 1) { main_bm.IfSetBack = true; } if (int.Parse(strArray2[1]) == 1) { main_bm.IfRollBack = true; } } return buttonShowTxt; }
public int IsHaveData(string emppk) { int num; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model.EmployeePK = emppk; num = model.ExistsByEmpPK(dbo); } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return num; }
private void DataUpdate() { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (((this.txtbh.Text.Trim() == "") || (this.txtName.Text.Trim() == "")) || ((this.txtssbmpk.Value.Trim() == "") || (this.txtssjspk.Value.Trim() == ""))) { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { string strEditMess = ""; if (!PageDo.IsChanged(ref strEditMess, true, this.Page) && (this.txtxbbak.Text == this.rblsex1.SelectedIndex.ToString())) { Const.ShowMessage("没有修改任何信息,请修改信息后再保存!", this.Page); } else { if (this.txtxbbak.Text != this.rblsex1.SelectedIndex.ToString()) { string str2 = strEditMess; strEditMess = str2 + "性别从 " + this.txtxbbak.Text + " 修改为 " + this.rblsex1.SelectedIndex.ToString(); } string strUser = base.Request.QueryString["PK"].ToString().Trim(); EmployeeModel model = new EmployeeDal { EmployeePK = strUser, BH = this.txtbh.Text.Trim(), Name = this.txtName.Text.Trim(), Sex = this.rblsex1.SelectedItem.Value }; if (this.txtage.Text.Trim() != "") { model.Age = int.Parse(this.txtage.Text.Trim()); } if (this.txtworkage.Text.Trim() != "") { model.WorkAge = int.Parse(this.txtworkage.Text.Trim()); } model.MZ = this.txtmz.Text.Trim(); model.Nationals = this.txtnational.Text.Trim(); model.Province = this.txtprovince.Text.Trim(); model.Area = this.txtarea.Text.Trim(); model.City = this.txtcity.Text.Trim(); model.PostalCode = this.txtpostcode.Text.Trim(); model.Address = this.txtaddress.Text.Trim(); model.Phone = this.txthousetel.Text.Trim(); model.OfficePhone = this.txtofficetel.Text.Trim(); model.Mobile1 = this.txtmobile1.Text.Trim(); model.Mobile2 = this.txtmobile2.Text.Trim(); model.QQNum = this.txtqq.Text.Trim(); model.ICQNum = this.txticq.Text.Trim(); model.MSNNum = this.txtmsn.Text.Trim(); model.Email = this.txtemail.Text.Trim(); if (this.txtBirthDay.Value.Trim() != "") { model.BirthDay = DateTime.Parse(this.txtBirthDay.Value.Trim()); } model.OtherLink = this.txtother.Text.Trim(); model.BranchPK = this.txtssbmpk.Value.Trim(); model.RolePK = this.txtssjspk.Value.Trim(); model.pk_corp = this.txtssgspk.Value.Trim(); if (model.Update(this.dbo) > 0) { UserModel model2 = new UserDal { EmployeePK = strUser }; if (model2.ExistsByEmpPK(this.dbo) > 0) { UserBll bll = new UserBll(); if (bll.Updateuserinfo(strUser, this.txtssbmpk.Value, this.txtssjspk.Value.Trim(), this.txtName.Text, this.txtssgspk.Value.Trim(), this.dbo) <= 0) { Const.DoSuccessClose("修改员工信息成功,但联动修改用户信息失败,请手动修改用户信息!", this.Page); } } Const.DoSuccessClose("修改员工信息成功!", this.Page); strEditMess = "编号为:" + this.txtbh.Text.Trim() + " 名称为:" + this.txtName.Text.Trim() + " 的职员修改信息:" + strEditMess; OperationLogBll.insertOp("修改", "职员列表", strEditMess, "Y", this.Page); } else { Const.ShowMessage("", this.Page); } } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "DataUpdate()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public int Updateuserinfo(string strUser, string power, string strname, string pk_corp) { int num; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); model.EmployeePK = strUser; model.UserName = strname; model.Power = power; model.pk_corp = pk_corp; num = model.Update(UserUpdatePowerType.BranchAndRole, UserUpdateIndex.AllowEmployeePK, dbo); } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return num; }
public static string btn_tb() { string str = ""; StringBuilder builder = new StringBuilder(); builder.Append("select distinct gsdm as PK_CORP,gsmc as Name,case len(gsdm) when 2 then 1 else 0 end as ISHASBABY,case len(gsdm) when 2 then 0 else 1 end as Grade,substring(gsdm,1,2) as FatherPK,substring(gsdm,1,2)+'|' as PKPath,'0' as ZXBJ from PubGszl where kjnd=(select max(kjnd) from PubGszl)"); builder.Append(" and gsdm in "); builder.Append(strSelectDW); builder.Append(" ; "); builder.Append("select gsdm as PK_CORP,kjnd,bmdm as BH,bmmc as Name from PUBBMXX where kjnd=(select max(kjnd) from PUBBMXX );"); builder.Append(" and gsdm in "); builder.Append(strSelectDW); builder.Append(" ; "); builder.Append("select gsdm,kjnd,zydm,zyxm,bmdm from PUBZYXX where kjnd=(select max(kjnd) from PUBZYXX );"); builder.Append(" and gsdm in "); builder.Append(strSelectDW); builder.Append(" ; "); builder.Append("select ID,name as UserName,password,gsdm as PK_CORP from gl_CZY;"); builder.Append(" and gsdm in "); builder.Append(strSelectDW); builder.Append(" ; "); DataSet set = DbHelperSQL.Query(builder.ToString()); DB_OPT dbo = new DB_OPT(); dbo.Open(); if ((set == null) || (set.Tables.Count != 4)) { return str; } DataTable table = set.Tables[0]; for (int i = 0; i < table.Rows.Count; i++) { DataRow row = table.Rows[i]; CompanyModel model = new CompanyDal { pk_corp = row["PK_CORP"].ToString(), Name = row["Name"].ToString(), IsHasBaby = row["ISHASBABY"].ToString(), Grade = Convert.ToInt32(row["Grade"].ToString()), FatherPK = row["FatherPK"].ToString(), PKPath = row["PKPath"].ToString(), ZXBJ = row["ZXBJ"].ToString() }; builder = new StringBuilder(); builder.Append("select * from DB_Company where pk_corp='"); builder.Append(model.pk_corp); builder.Append("'"); if (DbHelperOra.Exists(builder.ToString())) { builder = new StringBuilder(); builder.Append("update Db_Company set IsHasBaby='"); builder.Append(model.IsHasBaby); builder.Append("',Grade="); builder.Append(model.Grade); builder.Append(",FatherPK='"); builder.Append(model.FatherPK); builder.Append("',PKPath='"); builder.Append(model.PKPath); builder.Append("',ZXBJ='"); builder.Append(model.ZXBJ); builder.Append("' where PK_CORP='"); builder.Append(model.pk_corp); builder.Append("' "); DbHelperOra.ExecuteSql(builder.ToString()); } else { builder = new StringBuilder(); builder.Append("insert into Db_Company(pk_corp,Name,Ishasbaby,Grade,FatherPK,PKPath,ZXBJ) values('"); builder.Append(model.pk_corp); builder.Append("','"); builder.Append(model.Name); builder.Append("','"); builder.Append(model.IsHasBaby); builder.Append("',"); builder.Append(model.Grade); builder.Append(",'"); builder.Append(model.FatherPK); builder.Append("','"); builder.Append(model.PKPath); builder.Append("','"); builder.Append(model.ZXBJ); builder.Append("')"); DbHelperOra.ExecuteSql(builder.ToString()); builder = new StringBuilder(); builder.Append("insert into db_branch(BranchPK,BH,Name,ISHasbaby,grade,PK_CORP,ISJGBM) values (sys_Guid(),'D"); builder.Append(model.pk_corp); builder.Append("01','"); builder.Append(model.Name); builder.Append("默认部门',0,0,'"); builder.Append(model.pk_corp); builder.Append("',0)"); DbHelperOra.ExecuteSql(builder.ToString()); builder = new StringBuilder(); builder.Append("insert into db_role(RolePK,BH,Name,Power,ServicesPower,ISUserPower,Grade,BranchPK,PK_CORP )"); builder.Append("select sys_guid(),'R"); builder.Append(model.pk_corp); builder.Append("01','"); builder.Append(model.Name); builder.Append("默认角色',"); builder.Append("Power,ServicesPower,ISUserPower,Grade,(select BranchPK from Db_Branch where BH='D"); builder.Append(model.pk_corp); builder.Append("01' and Rownum=1),'"); builder.Append(model.pk_corp); builder.Append("' from db_role t where BH='R000000' "); DbHelperOra.ExecuteSql(builder.ToString()); } } table = set.Tables[1]; for (int j = 0; j < table.Rows.Count; j++) { DataRow row2 = table.Rows[j]; BranchModel model2 = new BranchDal { BH = row2["BH"].ToString(), Name = row2["Name"].ToString(), pk_corp = row2["PK_CORP"].ToString() }; if (model2.Exists(model2.BH, dbo) > 0) { model2.Update(dbo); } else { model2.Add(dbo); } } table = set.Tables[3]; for (int k = 0; k < table.Rows.Count; k++) { DataRow row3 = table.Rows[k]; UserModel model3 = new UserDal { UserName = row3["UserName"].ToString().Trim(), TrueName = row3["UserName"].ToString(), Password = QxRoom.QxConst.QxConst.Encrypt(row3["password"].ToString(), "powerich") }; if (string.IsNullOrEmpty(row3["PK_CORP"].ToString())) { model3.pk_corp = "01"; } else { model3.pk_corp = row3["PK_CORP"].ToString(); } if (model3.ExistsByUserName(dbo) > 0) { builder = new StringBuilder(); builder.Append("update DB_Users set Password ='******' , PK_Corp='"); builder.Append(model3.pk_corp); builder.Append("' , TrueName='"); builder.Append(model3.UserName); builder.Append("' where UserName='******'"); DbHelperOra.ExecuteSql(builder.ToString()); } else { builder = new StringBuilder(); builder.Append("insert into Db_Users(UserName,TrueName,Password,pk_corp,BranchPK,RolePK) values('"); builder.Append(model3.UserName); builder.Append("','"); builder.Append(model3.UserName); builder.Append("','"); builder.Append(model3.Password); builder.Append("','"); builder.Append(model3.pk_corp); builder.Append("',(select BranchPK from Db_Branch where BH='D"); builder.Append(model3.pk_corp); builder.Append("01' and Rownum=1),(SELECT rolepk FROM db_role WHERE BH='R"); builder.Append(model3.pk_corp); builder.Append("01' and Rownum=1))"); DbHelperOra.ExecuteSql(builder.ToString()); builder = new StringBuilder(); builder.Append("update db_users a set (a.Power, a.servicespower)= (select b.Power, b.servicespower from Db_Role b where a.RolePK=b.RolePK) where length(a.pk_corp)<=4"); DbHelperOra.ExecuteSql(builder.ToString()); } } dbo.Close(); StringBuilder builder2 = new StringBuilder(); builder2.Append("已成功同步乡财县管系统的基础数据! 本次共同步【单位数据】:"); builder2.Append(set.Tables[0].Rows.Count); builder2.Append(" 条;【部门数据】:"); builder2.Append(set.Tables[1].Rows.Count); builder2.Append(" 条;【人员数据】:"); builder2.Append(set.Tables[3].Rows.Count); builder2.Append(" 条"); return builder2.ToString(); }
public DataSet userinfo(string strwhere) { DataSet listAll; UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); try { dbo.Open(); listAll = model.GetListAll(strwhere, dbo); } catch (Exception exception) { throw exception; } finally { dbo.Close(); } return listAll; }
private void AddUser() { try { this.dbo = new DB_OPT(); this.dbo.Open(); if (((this.txtUserName.Text.Trim() == "") || (this.txtssbmpk.Value.Trim() == "")) || ((this.txtssgspk.Value.Trim() == "") || (this.txtssjspk.Value.Trim() == ""))) { Const.ShowMessage("带*的数据必须填写!", this.Page); } else { UserModel model = new UserDal { UserName = this.txtUserName.Text.Trim(), TrueName = this.txtTrueName.Text.Trim() }; if (model.ExistsByUserName(this.dbo) > 0) { Const.ShowMessage("用户名已经存在!", this.Page); } else { RoleModel model2 = new RoleDal { RolePK = this.txtssjspk.Value.Trim() }; model2 = model2.GetModel(false, false, this.dbo); BranchModel model3 = new BranchDal { BranchPK = this.txtssbmpk.Value.Trim() }; model3 = model3.GetModel(false, false, false, false, this.dbo); string str = PowerClass.SubTwoPower(this.PowerMenu1.GetPower(), model2.Power, "|"); model.Power = str; string str2 = PowerClass.SubTwoPower(this.PowerCompany1.GetPower(), model3.CompanyPower, "|"); model.CompanyPower = str2; model.BranchPK = this.txtssbmpk.Value.Trim(); model.RolePK = this.txtssjspk.Value.Trim(); if (this.txtPwd.Text.Trim() == "") { model.Password = QxRoom.QxConst.QxConst.Encrypt("123456", "powerich").Trim(); } else { model.Password = QxRoom.QxConst.QxConst.Encrypt(this.txtPwd.Text.Trim(), "powerich").Trim(); } model.pk_corp = this.txtssgspk.Value.Trim(); int count = 0; count = model.Add(this.dbo); if (base.Request["reload"] != null) { Const.AddSuccess(count, base.Request["reload"].ToString(), this.Page); } else { Const.AddSuccess(count, "", this.Page); } OperationLogBll.insertOp("新增", "用户列表", "在 " + this.txtssgs.Text.Trim() + " 单位 " + this.txtssbm.Text.Trim() + " 部门下新增用户名为:" + this.txtUserName.Text.Trim() + " 真实姓名为:" + this.txtTrueName.Text.Trim() + " 角色为:" + this.txtssjs.Text.Trim() + " 的用户,菜单权限为:" + this.PowerMenu1.GetPowerText() + " 管理范围为:" + this.PowerCompany1.GetPowerText(), "Y", this.Page); } } } catch (Exception exception) { this.el = new ExceptionLog.ExceptionLog(); this.el.ErrClassName = base.GetType().ToString(); this.el.ErrMessage = exception.Message.ToString(); this.el.ErrMethod = "AddUser()"; this.el.WriteExceptionLog(true); Const.OpenErrorPage("操作失败,请联系管理员!", this.Page); } finally { if (this.dbo != null) { this.dbo.Close(); } } }
public int adduserinfo(string strdept, string strposition, string stremployee, string strname, string strtruename, string strpwd, string strpk_crop, DB_OPT opt) { UserModel model = new UserDal { BranchPK = strdept, RolePK = strposition, EmployeePK = stremployee, UserName = strname, TrueName = strtruename, Password = strpwd, pk_corp = strpk_crop }; return model.Add(opt); }
private string BingData(string userpk, DB_OPT dbo) { UserModel model = new UserDal { UserPK = userpk }; model.GetModel(dbo); this.txtUserName.Text = model.UserName; this.txtUserName_bak.Text = model.UserName; this.txtTrueName.Text = model.TrueName; this.txtTrueName_bak.Text = model.TrueName; if (model.Password != "") { this.txtpass.Text = QxRoom.QxConst.QxConst.Decrypt(model.Password, "powerich"); this.txtPwd.Text = QxRoom.QxConst.QxConst.Decrypt(model.Password, "powerich"); this.txtPwd_bak.Text = QxRoom.QxConst.QxConst.Decrypt(model.Password, "powerich"); } if ((model.Branch != null) && (model.Branch.CompanyPower != null)) { this.txtcompower.Value = model.Branch.CompanyPower; this.txtcompower_bak.Value = model.Branch.CompanyPower; } if (model.Role != null) { this.txtrolepower.Value = model.Role.Power; this.txtrolepower_bak.Value = model.Role.Power; this.txtserpower.Value = model.Role.ServicesPower; this.txtserpower_bak.Value = model.Role.ServicesPower; } this.txtssgspk.Value = model.pk_corp.Trim(); this.txtssgspk_bak.Value = model.pk_corp.Trim(); this.txtssgs.Text = model.cName.Trim(); this.txtssgs_bak.Text = model.cName.Trim(); this.txtssbmpk.Value = model.BranchPK.Trim(); this.txtssbmpk_bak.Value = model.BranchPK.Trim(); this.txtssbm.Text = model.bName.Trim(); this.txtssbm_bak.Text = model.bName.Trim(); this.txtssjspk.Value = model.RolePK.Trim(); this.txtssjspk_bak.Value = model.RolePK.Trim(); this.txtssjs.Text = model.rName.Trim(); this.txtssjs_bak.Text = model.rName.Trim(); this.PowerCompany1.SetChecked(model.CompanyPower); this.PowerMenu1.SetChecked(model.Power); this.txtcombak.Value = this.PowerCompany1.GetPowerText(); this.txtmenubak.Value = this.PowerMenu1.GetPowerText(); return ""; }
public string getUpDownServerPKName(string path, string serverPK, int operation, out string NewServerPK) { UserModel model = new UserDal(); DB_OPT dbo = new DB_OPT(); model.GetUpDownStream(path, serverPK, operation, out NewServerPK, dbo); string sQLString = "select t.inpk from gov_tc_db_servicesmess t where trim(pk)=:pk"; OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":pk", OracleType.VarChar, 50) }; cmdParms[0].Value = NewServerPK; DataSet set = DbHelperOra.Query(sQLString, cmdParms); if (set.Tables[0].Rows.Count > 0) { return set.Tables[0].Rows[0][0].ToString(); } return ""; }
public static string GetCompanyWhere() { string str = HttpContext.Current.Session["pk_corp"].ToString(); string str2 = ""; if ((str != null) && (str.Trim() != "")) { DB_OPT dbo = new DB_OPT(); try { try { dbo.Open(); UserModel model = new UserDal { UserName = ((UserModel) HttpContext.Current.Session["User"]).UserName }; model.GetModel(dbo); string[] strArray = model.CompanyPower.Split(new char[] { '|' }); string str3 = ""; for (int i = 0; i < strArray.Length; i++) { str3 = str3 + strArray[i].Trim(); if (i < (strArray.Length - 1)) { str3 = str3 + "','"; } } if (str3 != "") { str3 = "'" + str3 + "'"; return (" and (trim(PD_PROJECT_INPUT_COMPANY) like '" + str.Trim() + "%' and trim(PD_PROJECT_INPUT_COMPANY) in (" + str3 + "))"); } return " and 1=0"; } catch (Exception) { str2 = " and 1=0 "; } return str2; } finally { if (dbo != null) { dbo.Close(); } } } return " and 1=0 "; }