private void setData() { view_Budget_money_head budget_money_head = null; cBudget_money oBudget_money = new cBudget_money(); try { _strCriteria = " and budget_money_doc = '" + ViewState["budget_money_doc"].ToString() + "' "; budget_money_head = oBudget_money.GET(_strCriteria); if (budget_money_head != null) { #region set Control TabContainer1.Tabs[1].Visible = true; //Tab 1 txtUpdatedBy.Text = budget_money_head.c_updated_by; txtUpdatedDate.Text = budget_money_head.d_updated_date.ToString(); chkStatus.Checked = budget_money_head.c_active == "Y"; txtbudget_money_doc.Text = budget_money_head.budget_money_doc; InitcboYear(); if (cboYear.Items.FindByValue(budget_money_head.budget_money_year) != null) { cboYear.SelectedIndex = -1; cboYear.Items.FindByValue(budget_money_head.budget_money_year).Selected = true; } InitcboDegree(); if (cboDegree.Items.FindByValue(budget_money_head.degree_code) != null) { cboDegree.SelectedIndex = -1; cboDegree.Items.FindByValue(budget_money_head.degree_code).Selected = true; } InitcboBudgetType(); if (cboBudget_type.Items.FindByValue(budget_money_head.budget_type) != null) { cboBudget_type.SelectedIndex = -1; cboBudget_type.Items.FindByValue(budget_money_head.budget_type).Selected = true; } txtbudget_plan_code.Text = budget_money_head.budget_plan_code; txtbudget_name.Text = budget_money_head.budget_name; txtproduce_name.Text = budget_money_head.produce_name; txtactivity_name.Text = budget_money_head.activity_name; txtplan_name.Text = budget_money_head.plan_name; txtwork_name.Text = budget_money_head.work_name; txtfund_name.Text = budget_money_head.fund_name; txtdirector_name.Text = budget_money_head.director_name; txtunit_name.Text = budget_money_head.unit_name; txtcomment.Text = budget_money_head.comments; BindGridViewDetail(); #endregion } } catch (Exception ex) { lblError.Text = ex.Message.ToString(); } }
protected void lbkRefresh_Click(object sender, EventArgs e) { cBudget_money oBudget_money = new cBudget_money(); string strMessage = string.Empty, strCriteria = string.Empty; try { strCriteria = " and budget_money_doc = '" + txtbudget_money_doc.Text + "' "; var item = oBudget_money.GET(strCriteria); if (item != null) { txtbudget_money_doc.Text = item.budget_money_doc; txtbudget_plan_code.Text = item.budget_plan_code; txtdirector_name.Text = item.director_name; txtunit_name.Text = item.unit_name; txtbudget_name.Text = item.budget_name; txtproduce_name.Text = item.produce_name; txtactivity_name.Text = item.activity_name; txtplan_name.Text = item.plan_name; txtwork_name.Text = item.work_name; txtfund_name.Text = item.fund_name; InitcboMajor(); InitcboItem_group_detail(); } } catch (Exception ex) { //lblError.Text = ex.Message.ToString(); } }