示例#1
0
 private void BindAutoDepositeAccount(string ClientType)
 {
     try
     {
         if (ClientType == "")
         {
             DDLGRAccountNo.Items.Clear();
             DDLGRAccountNo.Items.Insert(0, new ListItem("Select Account", "0"));
             return;
         }
         DDLGRAccountNo.Items.Clear();
         BAClients objBAClients = new BAClients();
         DataSet   ObjDsClients = objBAClients.GetClientByClientType(ClientType);
         if (ObjDsClients.Tables[0].Rows.Count > 0)
         {
             DDLGRAccountNo.DataSource     = ObjDsClients;
             DDLGRAccountNo.DataValueField = "ClientId";
             DDLGRAccountNo.DataTextField  = "ClientAccount";
             DDLGRAccountNo.DataBind();
             DDLGRAccountNo.Items.Insert(0, new ListItem("Select Account", "0"));
         }
         else
         {
             DDLGRAccountNo.Items.Insert(0, new ListItem("Select Account", "0"));
         }
     }
     catch (Exception ex)
     {
         lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "error", ex.Message);
         ExceptionLogging.SendExcepToDB(ex);
     }
 }
示例#2
0
 public void BindGRAccounts()
 {
     try
     {
         DataSet ds = _objBOUtiltiy.GetGeneralReceiptAccounts();
         if (ds.Tables[0].Rows.Count > 0)
         {
             DDLGRAccountNo.DataSource     = ds.Tables[0];
             DDLGRAccountNo.DataTextField  = "Account";
             DDLGRAccountNo.DataValueField = "ChartedAccId";
             DDLGRAccountNo.DataBind();
             DDLGRAccountNo.Items.Insert(0, new ListItem("Select Account", "0"));
         }
         else
         {
             DDLGRAccountNo.Items.Insert(0, new ListItem("Select Account", "0"));
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex);
     }
 }