private void setData() { cBudget_money oBudget_money = new cBudget_money(); string strMessage = string.Empty, strCriteria = string.Empty; try { strCriteria = " and budget_money_detail_id = '" + ViewState["budget_money_detail_id"].ToString() + "' "; var item = oBudget_money.GETDETAIL(strCriteria); if (item != null) { #region set Control InitcboLot(); if (cboLot.Items.FindByValue(item.lot_code) != null) { cboLot.SelectedIndex = -1; cboLot.Items.FindByValue(item.lot_code).Selected = true; } InitcboItem_group(); if (cboItem_group.Items.FindByValue(item.item_group_code) != null) { cboItem_group.SelectedIndex = -1; cboItem_group.Items.FindByValue(item.item_group_code).Selected = true; } InitcboItemGroupDetail(); if (cboItem_group_detail.Items.FindByValue(item.item_group_detail_id.ToString()) != null) { cboItem_group_detail.SelectedIndex = -1; cboItem_group_detail.Items.FindByValue(item.item_group_detail_id.ToString()).Selected = true; } ViewState["budget_money_doc"] = item.budget_money_doc; hdditem_detail_id.Value = item.item_detail_id.ToString(); txtitem_detail_code.Text = item.item_detail_code; txtitem_detail_name.Text = item.item_detail_name; txtitem_name.Text = item.item_name; txtbudget_money_detail_comment.Text = item.budget_money_detail_comment; txtbudget_money_detail_plan.Value = item.budget_money_detail_plan; txtbudget_money_detail_contribute.Value = item.budget_money_detail_contribute; txtbudget_money_detail_transfer.Value = item.budget_money_detail_transfer; txtbudget_money_detail_use.Value = item.budget_money_detail_use; txtbudget_money_detail_remain.Value = item.budget_money_detail_remain; txtUpdatedBy.Text = item.c_updated_by; txtUpdatedDate.Text = item.d_updated_date.ToString(); #endregion } } catch (Exception ex) { lblError.Text = ex.Message.ToString(); } }