protected void TreeView2_SelectedNodeChanged(object sender, EventArgs e) { DeptInfos dept = new DeptInfos(); string deptid = this.TreeView2.SelectedNode.Value; string deptname = this.TreeView2.SelectedNode.Text; int level = 0; //txtDeptMove.Text = dept.GetDeptpath(int.Parse(deptid), ref level); txtDeptMove.Text = WebCommon.GetParentTreeText(TreeView2); txtMoveLevel.Text = level.ToString(); txtMoveDeptID.Text = deptid; }
private void SetPageData() { //WebCommon.FillEstTree(TreeView1, intEstTermID, gUserInfo.Emp_Ref_ID); WebCommon.FillComDeptTree(TreeView1); if (DEPT_ID.Trim().Length > 0) { TreeView1.Enabled = false; SelectTreeNodeByValue(TreeView1.Nodes[0].ChildNodes, DEPT_ID); doBind_Emp(DEPT_ID); } }
private void GetlogEntity() { logEntity.F_LogId = Guid.NewGuid().ToString(); logEntity.F_OperateAccount = Passport.Current.UserName + "(" + Passport.Current.UserNickName + ")"; logEntity.F_OperateUserId = Passport.Current.UserId.ToString(); logEntity.F_OperateTime = DateTime.Now; logEntity.F_IPAddress = WebCommon.GetIPAddress(); logEntity.F_Host = WebHelper.Host; logEntity.F_Browser = WebCommon.GetClientBrowserVersions(); logEntity.F_DeleteMark = false; }
protected void btnSubmit_Click(object sender, EventArgs e) { if (txtAccount.Text.Trim() == "") { ShowMsg("请输入登录帐号"); return; } if (id == 0) { if (txtPwd.Text.Trim() == "") { ShowMsg("请输入登录密码"); return; } } if (txtPwd.Text.Trim() != txtPwdAgain.Text.Trim()) { ShowMsg("两次输入密码不一致"); return; } using (BLLAdminUser bll = new BLLAdminUser()) { AdminUser admin = new AdminUser(); if (id > 0) { admin = bll.GetSingle(id); } admin.ID = id; admin.Account = txtAccount.Text.Trim(); admin.TrueName = txtTrueName.Text; if (txtPwd.Text.Trim() != "") { admin.PassWord = WebCommon.Md5Enctry(txtPwd.Text.Trim()); } else { admin.PassWord = admin.PassWord; } bll.Save(admin); if (bll.IsFail) { ExceptionManager.ShowErrorMsg(this, bll.DevNetException); } else { JSMsg.ShowWinRedirect(this, "保存成功", "wfAdminUser.aspx"); } } }
public static string fxManageSaveByBundleBal(NameValueCollection objFormData) { var bundleCCODATADtls = new List <clsAccAgingUpdateCCODetails>(); var bundleCCODATA = new List <clsAccAgingZoningBundleSave>(); bundleCCODATADtls = (List <clsAccAgingUpdateCCODetails>)bundleCCODATADtls.ToClass(objFormData["jsonUpdateCCODetails"]); bundleCCODATA = (List <clsAccAgingZoningBundleSave>)bundleCCODATA.ToClass(objFormData["jsonZoningBundleData"]); string strParamDtls = WebCommon.ToXML(bundleCCODATADtls); string strParam = WebCommon.ToXML(bundleCCODATA); return(clsAccAgingZoningDAL.fxManageAgingBundleDAL(strParamDtls, strParam)); }
public ResResultModel GetPandianAssetList(PdaPandianAssetModel model) { try { if (model == null) { return(ResResult.Response(false, MC.Request_Params_InvalidError, "")); } var userId = WebCommon.GetUserId(); if (model.PageIndex < 1) { model.PageIndex = 1; } if (model.PageSize < 10) { model.PageSize = 10; } int totalRecord = 0; var pandianId = Guid.Empty; if (model.PandianId != null) { Guid.TryParse(model.PandianId.ToString(), out pandianId); } var sqlWhere = new StringBuilder(300); var parms = new ParamsHelper(); SqlParameter parm = null; sqlWhere.AppendFormat("and pda.Status = {0} ", (int)EnumPandianAssetStatus.未盘点); if (!pandianId.Equals(Guid.Empty)) { sqlWhere.Append("and PandianId = @PandianId "); parm = new SqlParameter("@PandianId", SqlDbType.UniqueIdentifier); parm.Value = pandianId; parms.Add(parm); } var bll = new PandianAsset(); var list = bll.GetListByJoin(model.PageIndex, model.PageSize, out totalRecord, sqlWhere.ToString(), parms.ToArray()); var totals = bll.GetTotal(pandianId); var dgData = "{\"total\":" + totalRecord + ",\"rows\":" + JsonConvert.SerializeObject(list) + ",\"footer\":[{\"TotalPan\":" + totals[0] + ",\"TotalYpan\":" + totals[1] + ",\"TotalNotPan\":" + totals[2] + "}]}"; return(ResResult.Response(true, "", dgData)); } catch (Exception ex) { return(ResResult.Response(false, ex.Message, "")); } }
protected void Page_Load(object sender, EventArgs e) { BLL = new XmxxBLL(WorkUser); Operate = Request.QueryString["operate"]; PkId = Request.QueryString["pkid"]; if (!this.IsPostBack) { if (!WorkUser.list.Exists(p => p.moduleCode.Equals(ModuleCode_Enum.ajxx.ToString(), StringComparison.CurrentCultureIgnoreCase) && p.operateCode.Equals(Ajxx_Operate.CreateOrEdit.ToString()))) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myScript", "showWarn('您没有权限进行此操作!');", true); return; } WebCommon.DropDownListDataBind(this.ddl_gcgk_jglx, "PrjStructureType", true); if (Operate.Equals("edit", StringComparison.CurrentCultureIgnoreCase)) { this.btnSelectLxxm.Visible = false; FunctionResult <DataTable> result = BLL.Read_aj_gcjbxx(PkId); if (result.Status != FunctionResultStatus.Error) { if (result.Result.Rows.Count > 0) { List <IDataItem> list = result.Result.Rows[0].ToDataItem(); this.SetControlValue(list); result = BLL.Read_TBProjectInfo(list.GetDataItem("PrjNum").ItemData); if (result.Status != FunctionResultStatus.Error) { if (result.Result.Rows.Count > 0) { list = result.Result.Rows[0].ToDataItem(); this.SetControlValue(list); } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myScript", "showError('" + result.Message.Message + "');", true); return; } } } else { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "myScript", "showError('" + result.Message.Message + "');", true); return; } } } }
public static List <clsRepoAccount> GetAccountsPending(NameValueCollection strQuerystring) { int intParser; var RepoAccountsParam = new RepoAccountsParam { strCriteria = strQuerystring.Get("strCriteria"), intIDMasLocation = int.TryParse(strQuerystring.Get("intIDMasLocation"), out intParser) ? intParser : 0, }; string strXML = WebCommon.ToXML(RepoAccountsParam); return(RepoAccountsDAL.GetAccountsPending(strXML)); }
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { DeptInfos dept = new DeptInfos(); string deptid = this.TreeView1.SelectedNode.Value; string deptname = this.TreeView1.SelectedNode.Text; ltrHiddenDeptID.Text = deptid; int level = 0; //ltrTreePath_Move.Text = dept.GetDeptpath(int.Parse(deptid), ref level); ltrTreePath_Move.Text = WebCommon.GetParentTreeText(TreeView1); ltrHiddenLevel.Text = level.ToString(); }
private void DoInitControl() { WebCommon.SetEstTermDropDownList(ddlEstTerm); WebCommon.SetEstDeptDropDownList(ddlEstDept, PageUtility.GetIntByValueDropDownList(ddlEstTerm), false); ddlWorkType.Items.Insert(0, new ListItem("전체", "")); ddlWorkType.Items.Insert(1, new ListItem("중점과제", "C")); ddlWorkType.Items.Insert(2, new ListItem("실행과제", "E")); ddlCompleteYN.Items.Insert(0, new ListItem("전체", "")); ddlCompleteYN.Items.Insert(1, new ListItem("완료", "Y")); ddlCompleteYN.Items.Insert(2, new ListItem("미완료", "N")); }
protected void Page_Load(object sender, EventArgs e) { UserManager userManager = new UserManager(); if (!userManager.ValidateUserLogin()) { WebCommon.RedirectPage(); } else { user = (User)Session["userInfo"]; } }
private void fxWriteToFile5() { try { var wrt = clsGLBAL.writetofiletext5(Request.QueryString, Request.Form); Response.Write(WebCommon.ToJSON(wrt)); } catch (Exception ex) { Response.Write("Error: " + ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { ESTTERM_REF_ID = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo); if (!Page.IsPostBack) { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); StgVersionDropDownBinding(); StatusInfo(); } ltrScript.Text = ""; }
private void DoInitControl() { WebCommon.SetEstTermDropDownList(ddlDraftTerm); int intEstTermId = (ddlDraftTerm.Items.Count > 0) ? int.Parse(ddlDraftTerm.SelectedValue) : 0; WebCommon.SetTermMonthDropDownList(ddlEstTermMonth, intEstTermId); Biz_Com_Code_Info objCode = new Biz_Com_Code_Info(); objCode.getResultMethod(ddlDraftResultType, "", true, 120); objCode.GetKpiType(ddlDraftKpiType, "", true, 120); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); this.EstTermRefId = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo); this.SetResultListGrid(); this.ITOP_URL = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""); } ltrScript.Text = ""; }
private void SetInitForm() { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); ddlGubun.Items.Add(new ListItem("개별지표", "N")); ddlGubun.Items.Add(new ListItem("연계(공통)지표", "Y")); //ddlGubun.Items.Add(new ListItem("일상공통(팀원MBO)", "P")); ddlGubun.Items.Add(new ListItem("전체", "")); //ddlGubun.Items.Add(new ListItem("일상업무(나의지표)", "N")); //ddlGubun.Items.Add(new ListItem("전략공통(팀지표)", "Y")); //ddlGubun.Items.Add(new ListItem("일상공통(팀원MBO)", "P")); //ddlGubun.Items.Add(new ListItem("전체", "")); }
public void Regist() { string email = Request["Mail"]; string pwd = Request["LoginPwd"]; string repwd = Request["LoginRepwd"]; string vcode = Request["Vcode"]; if (!string.IsNullOrEmpty(email) && !string.IsNullOrEmpty(pwd) && !string.IsNullOrEmpty(repwd) && !string.IsNullOrEmpty(vcode)) { if (Session["vcode"] != null && Session["vcode"].ToString() == vcode) { var user = userbll.LoadEntities(c => c.Mail == email).FirstOrDefault(); if (user == null) { Users usermodel = new Users(); usermodel.Mail = email; usermodel.LoginId = email; usermodel.LoginPwd = pwd.Md5(); usermodel.Name = string.Empty; usermodel.Phone = string.Empty; usermodel.Address = string.Empty; usermodel.UserRoleId = 2; usermodel.UserStateId = 1; usermodel.Money = 0; usermodel.Image = string.Empty; usermodel.RegTime = DateTime.Now; Users model = userbll.AddEntity(usermodel); if (model != null) { WebCommon.GoNext("亲,恭喜注册成功!", "登录", "/Account/Index"); } else { WebCommon.GoBack("亲,注册失败了哦!"); } } else { WebCommon.GoBack("亲,该邮箱已存在了哦!"); } } else { WebCommon.GoBack("验证码不正确!"); } } else { WebCommon.GoBack("数据填写不完整!"); } }
protected void ddlEstTermInfo_SelectedIndexChanged(object sender, EventArgs e) { WebCommon.SetTermMonthDropDownList(ddlMonthInfo, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)); this.IEstTermRefID = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo); Dac_EmpComDeptDetails objDept = new Dac_EmpComDeptDetails(); this.IEstDeptID = objDept.GetTopEstDeptPerEesterm(this.IEstTermRefID, gUserInfo.Emp_Ref_ID); WebCommon.FillEstTree(trvEstDept , this.IEstTermRefID , gUserInfo.Emp_Ref_ID , this.IEstDeptID); trvEstDept.ExpandAll(); if (trvEstDept.Nodes.Count > 0 && this.IEstDeptID > 0 && this.IEstTermRefID > 0) { this.SetParameter(); if (!this.HaveReadRight()) { ltrScript.Text = JSHelper.GetAlertScript("조회할 권한이 없습니다.", false); return; } this.SetDeptMapInfo(); this.SetDeptScoreCard(); } else if (trvEstDept.Nodes.Count > 0 && this.IEstDeptID < 1 && this.IEstTermRefID < 1) { trvEstDept.Nodes[0].Select(); this.IEstDeptID = (trvEstDept.SelectedNode == null) ? 0 : int.Parse(trvEstDept.SelectedNode.Value); this.SetParameter(); if (!this.HaveReadRight()) { return; } this.SetDeptMapInfo(); this.SetDeptScoreCard(); } else { lblDeptName.Text = ""; lblTotalScore.Text = ""; lblDeptVision.Text = ""; ugrdScoreCard.Clear(); } }
private void ImportDeviceRepairRecord(HttpContext context, HttpPostedFile file) { var dt = OpenXmlHelper.Import(file.InputStream); var drc = dt.Rows; if (drc.Count == 0) { context.Response.Write(ResResult.ResJsonString(false, MC.Import_NotDataError, "")); return; } var currTime = DateTime.Now; DateTime time = DateTime.MinValue; var list = new List <InfoneDeviceRepairRecordInfo>(); var userId = WebCommon.GetUserId(); foreach (DataRow dr in drc) { if (dr["日期"] != null) { DateTime.TryParse(dr["日期"].ToString(), out time); } if (time == DateTime.MinValue) { throw new ArgumentException(MC.Import_InvalidError); } var backDate = DateTime.MinValue; DateTime.TryParse(dr["归还日期"].ToString(), out backDate); if (backDate == DateTime.MinValue) { backDate = DateTime.Parse("1754-01-01"); } var modelInfo = new InfoneDeviceRepairRecordInfo(Guid.Empty, userId, time, dr["客户"].ToString(), dr["序列号"].ToString(), dr["型号"].ToString(), dr["故障原因"].ToString(), dr["解决方案"].ToString(), dr["客户问题"].ToString(), dr["配件"].ToString(), dr["处理情况"].ToString(), dr["是否修好"].ToString(), dr["交接人"].ToString(), dr["是否归还"].ToString() == "是" ? true : false, backDate, dr["登记人"].ToString(), dr["备注"].ToString(), currTime); list.Add(modelInfo); } var bll = new InfoneDeviceRepairRecord(); var index = 0; foreach (var model in list) { model.UserId = userId; if (bll.Insert(model) < 1) { throw new ArgumentException(string.Format("{0}", index > 0 ? "部分数据已经成功导入,但是执行到第“" + index + "”行时发生异常" : "数据导入失败,行“" + index + "”发生异常")); } index++; } context.Response.Write(ResResult.ResJsonString(true, "导入成功", "")); }
protected void Page_Load(object sender, EventArgs e) { string equipmentCode = WebCommon.GetStrPara(Context, "equipmentCode"); if (equipmentCode == null) { equipmentCode = ""; } List <tb_userCheck> luc = new tb_userCheckHandle().GetList("select * from tb_userCheck where equipmentCode='" + equipmentCode.Replace("'", "''") + "' order by id desc", 0, 0); rpData.DataSource = luc; rpData.DataBind(); }
private void InitControlValue() { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); int intEstTermId = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo); WebCommon.SetTermMonthDropDownList(ddlEstTermMonth, intEstTermId); WebCommon.SetComDeptDropDownList(ddlEstDept, true); Biz_Com_Code_Info objCode = new Biz_Com_Code_Info(); objCode.getResultMethod(ddlResultMethod, "", true, 0); objCode.GetKpiType(ddlKpiGroupRefID, "", true, 0); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); WebCommon.SetEstTermDropDownList(ddlEstTermInfo2); DoSetPossibleCopay(); TextBoxCommon.SetOnlyInteger(txtMAX_VALUE); TextBoxCommon.SetOnlyInteger(txtMIN_VALUE); DoBinding(); } ltrScript.Text = ""; }
public static List <clsCustomer> fxGetCustomerForORCR(NameValueCollection strQuerystring) { UserProfile objUserProfile = WebCommon.GetUserProfile(); var objCustomerSearchParam = new clsCustomerSearchParam { intIDSecUser = objUserProfile.UserId , strCriteria = strQuerystring.Get("strCriteria") }; string strXML = WebCommon.ToXML(objCustomerSearchParam); return(CommonDAL.fxGetCustomerForORCR(strXML)); }
public void SearchData(int pageIndex) { int allRecordCount; List <IDataItem> list = this.GetControlValue(); WebCommon.AddDataItem(list, "apiFlow", apiFlow); DataTable dt = xxgxBll.RetrieveApiCb(list, this.gridView.PageSize, pageIndex, "apiDyTime desc", out allRecordCount); this.gridView.RecordCount = allRecordCount; this.gridView.PageIndex = pageIndex; this.gridView.DataSource = dt; this.gridView.DataBind(); }
public static List <clsBankAccount> fxGetBankAccount(NameValueCollection strQuerystring) { UserProfile objUserProfile = WebCommon.GetUserProfile(); var objBankAccountSearchParam = new clsBankAccountSearchParam { intIDSecUser = objUserProfile.UserId , strCriteria = strQuerystring.Get("strCriteria") }; string strXML = WebCommon.ToXML(objBankAccountSearchParam); return(CommonDAL.fxGetBankAccount(strXML)); }
protected void Page_Load(object sender, EventArgs e) { dictCode = WebCommon.GetRequest("dictcode"); if (string.IsNullOrEmpty(dictCode)) { return; } if (!IsPostBack) { this.BindData(); } }
public static clsMasCOAIndSuppList[] fxGetCOAIndSuppList(NameValueCollection strQuerystring) { UInt32 intIDMasCOASupp; var objMasCOAIndSuppSearchParam = new clsMasCOAIndSuppSearchParam { intIDMasCOASupp = UInt32.TryParse(strQuerystring.Get("intIDMasCOASupp"), out intIDMasCOASupp) ? intIDMasCOASupp : Convert.ToUInt32(0), strCriteria = strQuerystring.Get("strMasCOAIndSuppName") }; string strXMLParam = WebCommon.ToXML(objMasCOAIndSuppSearchParam); return(clsMasCOADAL.fxGetCOAIndSuppList(strXMLParam)); }
public static clsMasCOASubList[] fxGetCOASubList(NameValueCollection strQuerystring) { UInt16 intIDMasCOA; var objMasCOASubsidiarySearchParam = new clsMasCOASubsidiarySearchParam { intIDMasCOA = UInt16.TryParse(strQuerystring.Get("intIDMasCOA"), out intIDMasCOA) ? intIDMasCOA : Convert.ToUInt16(0), strCriteria = strQuerystring.Get("strMasCOASubName"), }; string strXMLParam = WebCommon.ToXML(objMasCOASubsidiarySearchParam); return(clsMasCOADAL.fxGetCOASubList(strXMLParam)); }
public ResResultModel SaveContentDetail(ContentDetailFmModel model) { try { if (model == null) { return(ResResult.Response(false, MC.Request_Params_InvalidError, null)); } if (string.IsNullOrWhiteSpace(model.AppCode) || string.IsNullOrWhiteSpace(model.Title)) { return(ResResult.Response(false, MC.Request_Params_InvalidError, null)); } Guid Id = Guid.Empty; if (model.Id != null) { Guid.TryParse(model.Id.ToString(), out Id); } Guid contentTypeId = Guid.Empty; if (model.ContentTypeId != null) { Guid.TryParse(model.ContentTypeId.ToString(), out contentTypeId); } var userId = WebCommon.GetUserId(); var currTime = DateTime.Now; var modelInfo = new ContentDetailInfo(model.AppCode, Id, userId, contentTypeId, model.Title, model.Keyword, model.Descr, model.ContentText, model.Openness, model.Sort, currTime, currTime); var bll = new ContentDetail(); int effect = -1; if (Id.Equals(Guid.Empty)) { modelInfo.Id = Guid.NewGuid(); effect = bll.InsertByOutput(modelInfo); } else { effect = bll.Update(modelInfo); } if (effect < 1) { return(ResResult.Response(false, MC.M_Save_Error, "")); } return(ResResult.Response(true, "", modelInfo.Id)); } catch (Exception ex) { return(ResResult.Response(false, ex.Message, "")); } }
private void GetlogEntity() { logEntity.F_LogId = Guid.NewGuid().ToString(); System.Web.Caching.Cache objCache = HttpRuntime.Cache; logEntity.F_OperateAccount = ((T_User)objCache["session_user"]).userId.ToString(); logEntity.F_OperateUserId = Passport.Current.UserId.ToString(); logEntity.F_OperateTime = DateTime.Now; logEntity.F_IPAddress = WebCommon.GetIPAddress(); logEntity.F_Host = WebHelper.Host; logEntity.F_Browser = WebCommon.GetClientBrowserVersions(); logEntity.F_DeleteMark = false; }