protected void iBtnUnitTypeModify_Click(object sender, ImageClickEventArgs e) { UnitTypeInfos unitInfo = new UnitTypeInfos(); bool isOk = false; try { isOk = unitInfo.ModifyUnitTypeGroup(txtUnitGroup.Text, hdfUnitGroup.Value); } catch (Exception ex) { ltrScript.Text = JSHelper.GetAlertScript("수정 중 오류가 발생하였습니다.", false); return; } if (isOk) { ltrScript.Text = JSHelper.GetAlertScript("수정이 완료되었습니다", false); Reload(); } else { ltrScript.Text = JSHelper.GetAlertScript("수정할 Unit그룹을 선택해주세요", false); } }
private void DataBindingUnit(string unit_type) { UnitTypeInfos unitInfo = new UnitTypeInfos(unit_type); DataSet ds = unitInfo.GetAllUnitTypeInfo(unit_type); UltraWebGrid2.DataSource = ds; UltraWebGrid2.DataBind(); }
private void DataBindingUnitType() { UnitTypeInfos unitInfo = new UnitTypeInfos(); DataSet ds = unitInfo.GetUnitTypeGroup(); UltraWebGrid1.DataSource = ds; UltraWebGrid1.DataBind(); }
private void SetUnitTypeDroupDownList() { UnitTypeInfos unitInfo = new UnitTypeInfos(); DataSet ds = unitInfo.GetUnitTypeGroup(); ddlUnitGroup.DataSource = ds; ddlUnitGroup.DataTextField = "UNIT_TYPE"; ddlUnitGroup.DataBind(); }
private void SetUnitTypeInfo(int unit_type_ref_id) { UnitTypeInfos unitInfo = new UnitTypeInfos(unit_type_ref_id); ddlUnitGroup.Text = unitInfo.Unit_Type; ddlUnitGroup.Enabled = false; txtUnit.Text = unitInfo.Unit; txtFormatString.Text = unitInfo.Format_String; txtDecimalPoint.Text = unitInfo.Decimal_Point.ToString(); txtRoundingType.Text = unitInfo.Rounding_Type; if (unitInfo.Use_Yn.Equals("Y")) { chkUse.Checked = true; } }
protected void iBtnUnitRemove_Click(object sender, ImageClickEventArgs e) { UnitTypeInfos unitInfo = new UnitTypeInfos(); CheckBox chk; UltraGridRow row; TemplatedColumn col; bool isOK = false; string unit; string unit_id; for (int i = 0; i < this.UltraWebGrid2.Rows.Count; i++) { row = UltraWebGrid2.Rows[i]; col = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox"); if (chk.Checked) { try { unit = row.Cells.FromKey("UNIT").Value.ToString(); unit_id = row.Cells.FromKey("UNIT_TYPE_REF_ID").Value.ToString(); isOK = unitInfo.RemoveUnitTypeInfo(Convert.ToInt32(unit_id), unit); } catch (Exception ex) { ltrScript.Text = JSHelper.GetAlertScript("삭제 중 오류가 발생하였습니다.", false); return; } } } if (!isOK) { ltrScript.Text = JSHelper.GetAlertScript("삭제할 Unit 항목을 선택주세요.", false); } else { ltrScript.Text = JSHelper.GetAlertScript("삭제되었습니다", false); Reload(); } }
protected void iBtnModify_Click(object sender, ImageClickEventArgs e) { UnitTypeInfos unitInfo = new UnitTypeInfos(); GetData(); bool isOK = false; try { isOK = unitInfo.ModifyUnitTypeInfo(_unitgroup, _unit, _formatstring, _decimalpoint, _roundingtype, _use, _user, _unit_id); } catch (Exception ex) { ltrScript.Text = JSHelper.GetAlertScript("수정 중 오류가 발생했습니다.", false); return; } if (isOK) { ltrScript.Text = JSHelper.GetAlertOpenerControlCallBackScript("수정 완료되었습니다", this.ICCB1, true); } }