private void GetBillDetailsbyId(int id) { Dispatch dispatch = new Dispatch(); DispatchData dispatchData = new DispatchData(); DataSet DS = new DataSet(); DS = dispatchData.CashierGetDetailsId(id); if (!Comman.Comman.IsDataSetEmpty(DS)) { txtAgentName.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["AgentName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["AgentName"].ToString(); txtHidden.Text = id.ToString(); txtPaymentMode.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["BillingType"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["BillingType"].ToString(); txtTotalBill.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["FinalBillingAmount"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["FinalBillingAmount"].ToString(); txtPendingBill.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["PendingAmount"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["PendingAmount"].ToString(); txtReceivedAmount.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["ReceivedAmount"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["ReceivedAmount"].ToString(); //txtCommodityName.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["CommodityName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["CommodityName"].ToString(); // txtAgentName.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["AgentName"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["AgentName"].ToString(); } }