//private void LoadSOADetails(string sSOANum) //{ //} private void LoadAddSOA(string sTrans, string sYear, string sWeekNum, string sCustCode, string sSOANum, string sUserKey) { DataTable dt = HLSSOA.Customer_Info(sCustCode); if (dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { txtCustCode.Text = row["CustCode"].ToString(); txtCustomer.Text = row["CustName"].ToString(); txtCustomerAdd.Text = row["CustAdd"].ToString(); txtAttention.Text = row["CustAtt"].ToString(); txtAttentionNum.Text = row["CustAttNum"].ToString(); } } dt.Clear(); DataTable dt1 = HLSSOA.SOA_Footer(sSOANum, sTrans); if (dt1.Rows.Count > 0) { foreach (DataRow row in dt1.Rows) { txtDate.Text = row["SOADate"].ToString(); txtYear.Text = row["Year"].ToString(); txtWeekNum.Text = row["WeekNum"].ToString(); txtSOANumber.Text = row["SOANum"].ToString(); txtRemarks.Text = row["Remarks"].ToString(); txtPreparedBy.Text = row["PreparedBy"].ToString(); txtPreparedByPost.Text = row["PreparedByPost"].ToString(); txtCheckedBy.Text = row["CheckedBy"].ToString(); txtCheckedByPost.Text = row["CheckedByPost"].ToString(); txtApprovedBy.Text = row["ApprovedBy"].ToString(); txtApprovedByPost.Text = row["ApprovedByPost"].ToString(); } } dt1.Clear(); HLSWaybill.DataSource = HLSSOA.HLSSOA_Details(sSOANum, sUserKey, sCustCode, sYear, sWeekNum); HLSWaybill.KeyFieldName = "Waybill"; HLSWaybill.DataBind(); switch (sTrans) { case "Add": { Page.Title = "HLS - SOA (Add)"; HLSSOATitle.InnerText = "HLS - Statement Of Account (Add)"; txtDate.Text = DateTime.Now.ToString("MM/dd/yyyy"); txtYear.Text = sYear; txtWeekNum.Text = sWeekNum; txtRemarks.Text = "This is to bill the trucking services rendered for (Commodity: Fresh Bananas) Wk" + sWeekNum + ", details hereunder as follows:"; txtDate.ReadOnly = true; txtYear.ReadOnly = true; txtWeekNum.ReadOnly = true; txtCustomer.ReadOnly = true; txtCustomerAdd.ReadOnly = true; txtSOANumber.ReadOnly = false; txtAttention.ReadOnly = false; txtAttentionNum.ReadOnly = false; txtRemarks.ReadOnly = false; txtPreparedBy.ReadOnly = false; txtPreparedByPost.ReadOnly = false; txtCheckedBy.ReadOnly = false; txtCheckedByPost.ReadOnly = false; txtApprovedBy.ReadOnly = false; txtApprovedByPost.ReadOnly = false; BtnSaveSOA.Text = "S A V E"; //BtnSaveSOA.Enabled = true; HLSWaybillList.DataSource = HLSSOA.SOAWaybill_for_Save(sUserKey); HLSWaybillList.KeyFieldName = "Waybill"; HLSWaybillList.DataBind(); break; } case "View": { Page.Title = "HLS - SOA (View)"; HLSSOATitle.InnerText = "HLS - Statement Of Account (View)"; txtDate.ReadOnly = true; txtYear.ReadOnly = true; txtWeekNum.ReadOnly = true; txtCustomer.ReadOnly = true; txtCustomerAdd.ReadOnly = true; txtSOANumber.ReadOnly = true; txtAttention.ReadOnly = true; txtAttentionNum.ReadOnly = true; txtRemarks.ReadOnly = true; txtPreparedBy.ReadOnly = true; txtPreparedByPost.ReadOnly = true; txtCheckedBy.ReadOnly = true; txtCheckedByPost.ReadOnly = true; txtApprovedBy.ReadOnly = true; txtApprovedByPost.ReadOnly = true; BtnSaveSOA.Text = "P R I N T"; //BtnSaveSOA.Enabled = false; //HLSWaybillList.DataSource = HLSSOA.SOAWaybill_for_Save(sUserKey); //HLSWaybillList.KeyFieldName = "Waybill"; //HLSWaybillList.DataBind(); break; } } }