protected void lbtnEdit_Click(object sender, EventArgs e) { GridViewRow gr = (GridViewRow)((LinkButton)sender).Parent.Parent; txtAssociationCode.Text = ((Label)gr.FindControl("lblAssociationCode")).Text; txtAssociationName.Text = ((Label)gr.FindControl("lblAssociationName")).Text; string _compType = ((Label)gr.FindControl("lblCompType")).Text; if (_compType != "") { ddlCompType.SelectedValue = _compType; } else { ddlCompType.SelectedValue = "03"; } string _agentType = ((Label)gr.FindControl("lblAgentType")).Text; if (_agentType != "") { ddlAgentType.SelectedValue = _agentType; } else { ddlAgentType.SelectedValue = "03"; } txtAssociationCode.Enabled = false; btnSave.Visible = false; btnUpdate.Visible = true; SetCheckBoxLicense(txtAssociationCode.Text); mpeAssociation.Show(); UplPopUp.Update(); }
protected void btnSave_Click(object sender, EventArgs e) { try { if (txtAssociationCode.Text.Length == 3) { BLL.DataCenterBiz biz = new BLL.DataCenterBiz(); DTO.ConfigAssociation ent = new DTO.ConfigAssociation(); ent.ASSOCIATION_CODE = txtAssociationCode.Text.Trim(); ent.ASSOCIATION_NAME = txtAssociationName.Text.Trim(); if (ddlAgentType.SelectedValue != "") { ent.AGENT_TYPE = ddlAgentType.SelectedValue; } if (ddlCompType.SelectedValue != "") { ent.COMP_TYPE = ddlCompType.SelectedValue; } ent.ACTIVE = "Y"; List <DTO.AssociationLicense> al = new List <DTO.AssociationLicense>(); foreach (ListItem i in chkLicense.Items) { al.Add(new DTO.AssociationLicense { LICENSE_TYPE_CODE = i.Value, ACTIVE = i.Selected ? "Y" : "N" }); } var res = biz.InsertAssociation(ent, UserProfile, al); if (!res.IsError) { initGridAssociation(); UCSuccess.ShowMessageSuccess = SysMessage.SaveSucess; UCSuccess.ShowModalSuccess(); } else { UCError.ShowMessageError = res.ErrorMsg; UCError.ShowModalError(); mpeAssociation.Show(); UplPopUp.Update(); } } else { UCError.ShowMessageError = "รหัสสมาคมต้องมีจำนวน 3 หลักเท่านั้น"; UCError.ShowModalError(); } } catch (Exception ex) { UCError.ShowMessageError = ex.Message; UCError.ShowModalError(); mpeAssociation.Show(); UplPopUp.Update(); } //txtAssociationCode.Text = ""; //txtAssociationName.Text = ""; }
protected void lbtnEditMemberType_Click(object sender, EventArgs e) { GridViewRow gr = (GridViewRow)((LinkButton)sender).NamingContainer; string id = ((Label)gr.FindControl("lblUserID")).Text; SetPopUpEditMemberType(id); PopUpEditTypeAccount.Show(); UplPopUp.Update(); }
protected void lbtnConfig_Click(object sender, EventArgs e) { GridViewRow gr = (GridViewRow)((LinkButton)sender).NamingContainer; string testingNo = ((Label)gr.FindControl("lblTestingNo")).Text; string examPlaceCode = ((Label)gr.FindControl("lblExamPlaceCode")).Text; hdfExamPlaceCode.Value = examPlaceCode; BindPopUp(testingNo, examPlaceCode); PopUpLicense.Show(); UplPopUp.Update(); }
protected void btnPopUp_Click(object sender, EventArgs e) { InitCheckBoxLicense(); txtAssociationCode.Enabled = true; txtAssociationCode.Text = ""; txtAssociationName.Text = ""; ddlAgentType.SelectedValue = "03"; ddlCompType.SelectedValue = "03"; btnSave.Visible = true; btnUpdate.Visible = false; mpeAssociation.Show(); UplPopUp.Update(); }
protected void btnSave_Click(object sender, EventArgs e) { ExamScheduleBiz biz = new ExamScheduleBiz(); try { DTO.ExamSchedule ent = new DTO.ExamSchedule(); ent.TESTING_NO = txtSetTestingNo.Text; ent.EXAM_PLACE_CODE = hdfExamPlaceCode.Value; ent.PRIVILEGE_STATUS = rblSetImport.SelectedValue; var res = biz.UpdateExam(ent); if (!res.IsError) { PopUpLicense.Hide(); this.MasterSite.ModelSuccess.ShowMessageSuccess = SysMessage.SaveSucess; this.MasterSite.ModelSuccess.ShowModalSuccess(); btnSearch_Click(sender, e); //uplConditionDelay.Update(); UplPopUp.Update(); } else { PopUpLicense.Show(); this.MasterSite.ModelError.ShowMessageError = res.ErrorMsg; this.MasterSite.ModelError.ShowModalError(); UplPopUp.Update(); } } catch (Exception ex) { PopUpLicense.Show(); this.MasterSite.ModelError.ShowMessageError = ex.Message; this.MasterSite.ModelError.ShowModalError(); UplPopUp.Update(); } }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountBiz biz = new AccountBiz(); try { DTO.AccountDetail ent = new DTO.AccountDetail(); ent.ID = lblUserId.Text; ent.MEMBER_TYPE = ddlMemberTypeEdit.SelectedValue; if (ent.MEMBER_TYPE == "2" && trCompany.Visible == true) { ent.COMP_CODE = txtCompanyId.Text.Trim(); } else if (ent.MEMBER_TYPE == "3" && trAssoc.Visible == true) { ent.COMP_CODE = txtAssocId.Text.Trim(); } else if (ent.MEMBER_TYPE == "7" && trExamPlaceGroup.Visible == true) { ent.COMP_CODE = ddlExamPlaceGroup.SelectedValue; } else { ent.COMP_CODE = UserCompCode; } ent.OTH_USER_TYPE = txtRemark.Text; var res = biz.EditMemberTypeAndActive(ent, UserProfile); if (!res.IsError) { PopUpEditTypeAccount.Hide(); this.MasterSite.ModelSuccess.ShowMessageSuccess = SysMessage.SaveSucess; this.MasterSite.ModelSuccess.ShowModalSuccess(); btnSearch_Click(sender, e); UpdatePanelGv.Update(); UplPopUp.Update(); } else { PopUpEditTypeAccount.Show(); this.MasterSite.ModelError.ShowMessageError = res.ErrorMsg; this.MasterSite.ModelError.ShowModalError(); if (ent.MEMBER_TYPE == "2" && trCompany.Visible == true) { SetCompanyIdName(); } else if (ent.MEMBER_TYPE == "3" && trAssoc.Visible == true) { SetAssocIdName(); } else if (ent.MEMBER_TYPE == "7" && trExamPlaceGroup.Visible == true) { SetExamPlaceGroup(); } UplPopUp.Update(); } } catch (Exception ex) { PopUpEditTypeAccount.Show(); this.MasterSite.ModelError.ShowMessageError = ex.Message; this.MasterSite.ModelError.ShowModalError(); UplPopUp.Update(); } }
protected void btnClosePopup_Click(object sender, EventArgs e) { PopUpEditTypeAccount.Hide(); UplPopUp.Update(); }
protected void ddlAgentType_SelectedIndexChanged(object sender, EventArgs e) { ValidTypeCheckBox(); mpeAssociation.Show(); UplPopUp.Update(); }