private void InitControlValue() { DataSet ds = new DataSet(); Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); string sCodeID = TypeUtility.GetNumString(GetRequest("CODE_ID")); ds = biz.GetSearchCode(sCodeID); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { lblType.Text = GetValue(ds.Tables[0].Rows[0]["V_TYPE"]); txtThresholdName.Text = GetValue(ds.Tables[0].Rows[0]["V_STEPNAME"]); txtMinValue.Text = GetValue(ds.Tables[0].Rows[0]["V_MIN_VALUE"]); txtColor.Text = GetValue(ds.Tables[0].Rows[0]["V_COLOR"]); txtPoint.Text = GetValue(ds.Tables[0].Rows[0]["V_POINT"]); imgPrev.ImageUrl = GetRegFileUrl(GetValue(ds.Tables[0].Rows[0]["V_IMG_PATH"])); } else { PageUtility.ExecuteScript("alert('수정을 위한 정보를 알 수 없습니다!\n\n다시 시도해 주십시요!');gfCloseWindow();"); } } else { PageUtility.ExecuteScript("alert('수정을 위한 정보를 알 수 없습니다!\n\n다시 시도해 주십시요!');gfCloseWindow();"); } }
private DataSet GetSearchData() { Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); string sType = PageUtility.GetByValueDropDownList(ddlType); DataSet lDS = biz.GetSearchData(sType); return(lDS); }
private void InitControlValue() { Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); DataSet dsType = biz.GetAllType(); ddlType.Items.Clear(); ddlType.DataSource = dsType; ddlType.DataTextField = "V_TYPE_NAME"; ddlType.DataValueField = "V_TYPE"; ddlType.DataBind(); PageUtility.FindByValueDropDownList(ddlType, CS_DEFAULT_TYPE); }
private void AddThreshold() { string sScript = string.Empty; if (Utils.FileExtensionValidator(fileUpload.PostedFile)) { string sErrMsg = ""; if (!IsMandatory(out sErrMsg)) { PageUtility.ExecuteScript(sErrMsg); return; } string sFileName = ""; sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, "Ctl.UploadImages.CTL4100"); if (sFileName == "") { PageUtility.AlertMessage("이미지를 저장하는데 실패하였습니다!\n\n관리자에게 문의하십시오!"); return; } Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); string sType = TypeUtility.GetNumString(GetRequest("TYPE")); string sThresholdName = GetValue(txtThresholdName.Text); string sMinValue = GetValue(txtMinValue.Text); string sColor = GetValue(txtColor.Text); string sPoint = GetValue(txtPoint.Text); int iRet = biz.AddThreshold(sType, sThresholdName, sMinValue, sColor, sFileName, sPoint); sScript = string.Format("alert('[{0}]건이 등록되었습니다!');", iRet); if (iRet > 0) { sScript += "try{opener.__doPostBack('lbReload', '');}catch(e){};gfCloseWindow();"; } } else { sScript = "alert('유효하지 않은 파일입니다.');"; } PageUtility.ExecuteScript(sScript); }
private void DelThresHold() { Infragistics.WebUI.UltraWebGrid.UltraGridRow ugRow; Infragistics.WebUI.UltraWebGrid.TemplatedColumn ugCol; string sPKID = ""; string[,] saPKID; string sScript = ""; bool bCheck = false; for (int i = 0; i < this.UltraWebGrid1.Rows.Count; i++) { ugRow = this.UltraWebGrid1.Rows[i]; bCheck = Convert.ToBoolean(ugRow.Cells.FromKey("selChk").Value); if (bCheck) { sPKID += GetValue(ugRow.Cells.FromKey("V_CODE_ID").Value) + ";"; } } saPKID = TypeUtility.GetSplit(sPKID); if (saPKID.GetUpperBound(0) <= -1) { PageUtility.AlertMessage("삭제할 대상을 선택하셔야 합니다."); return; } Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); int iRet = biz.DelThreshold(saPKID); sScript += string.Format( "[{0}]건이 삭제되었습니다!" , iRet ); PageUtility.AlertMessage(sScript); SearchDB(); }
private void UpdateThreshold() { string sErrMsg = ""; if (!IsMandatory(out sErrMsg)) { PageUtility.ExecuteScript(sErrMsg); return; } string sFileName = ""; if (fileUpload.Value != "") { sFileName = Utils.FileExtensionValidator(fileUpload.PostedFile) == true ? sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, CS_FILE_SAVE_INFO) : sFileName = ""; if (sFileName == "") { PageUtility.AlertMessage("이미지를 저장하는데 실패하였습니다!\n\n관리자에게 문의하십시오!"); return; } } Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100(); string sCodeID = TypeUtility.GetNumString(GetRequest("CODE_ID")); string sThresholdName = GetValue(txtThresholdName.Text); string sMinValue = GetValue(txtMinValue.Text); string sColor = GetValue(txtColor.Text); string sPoint = GetValue(txtPoint.Text); int iRet = biz.UpdateThreshold(sCodeID, sThresholdName, sMinValue, sColor, sFileName, sPoint); string sScript = string.Format("alert('[{0}]건이 수정되었습니다!');", iRet); if (iRet > 0) { sScript += "try{opener.__doPostBack('lbReload', '');}catch(e){};gfCloseWindow();"; } PageUtility.ExecuteScript(sScript); }