private void BindListBySearchParameters(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        try
        {
            DataTable dtb = customerAndGroupAccountListBAL.GetCustomerAndGroupAccountListBySearchParameters(customerAndGroupAccountListUI);


            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvData.DataSource = dtb;
                gvData.DataBind();
                divError.Visible = false;
                gvData.Visible   = true;
            }
            else
            {
                divError.Visible = true;
                lblError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvData.Visible   = false;
            }

            txtSearch.Text = "";
            txtSearch.Focus();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "BindListBySearchParameters()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Receivable_Customer_Master_Creation_CustomerAndGroupAccountList.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Receivable_Customer_Master_Creation_CustomerAndGroupAccountList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
示例#2
0
    public int DeleteCustomerAndGroupAccount(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        int result = 0;

        result = customerAndGroupAccountListDAL.DeleteCustomerAndGroupAccount(customerAndGroupAccountListUI);
        return(result);
    }
示例#3
0
    public DataTable GetCustomerAndGroupAccountListBySearchParameters(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerAndGroupAccountListDAL.GetCustomerAndGroupAccountListBySearchParameters(customerAndGroupAccountListUI);
        return(dtb);
    }
示例#4
0
    public DataTable GetCustomerAndGroupAccountListById(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerAndGroupAccountListDAL.GetCustomerAndGroupAccountListById(customerAndGroupAccountListUI);
        return(dtb);
    }
    public DataTable GetCustomerAndGroupAccountListById(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

        //Boolean result = false;
        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SqlCommand sqlCmd = new SqlCommand("SP_CustomerAndGroupAccount_SelectById", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_CustomerAndGroupAccountId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerAndGroupAccountId"].Value = customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId;

                using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd))
                {
                    adapter.Fill(ds);
                }
            }
            if (ds.Tables.Count > 0)
            {
                dtbl = ds.Tables[0];
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "getCustomerAndGroupAccountListById()";
            logExcpUIobj.ResourceName     = "CustomerAndGroupAccountListDAL.CS";
            logExcpUIobj.RecordId         = customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[CustomerAndGroupAccountListDAL : getCustomerAndGroupAccountListById] An error occured in the processing of Record Id : " + customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
    public int DeleteCustomerAndGroupAccount(CustomerAndGroupAccountListUI customerAndGroupAccountListUI)
    {
        int result = 0;

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SupportCon.Open();
                SqlCommand sqlCmd = new SqlCommand("SP_CustomerAndGroupAccount_Delete", SupportCon);

                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_CustomerAndGroupAccountId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerAndGroupAccountId"].Value = customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteCustomerAndGroupAccount()";
            logExcpUIobj.ResourceName     = "CustomerAndGroupAccountListDAL.CS";
            logExcpUIobj.RecordId         = customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[CustomerAndGroupAccountListDAL : DeleteCustomerAndGroupAccount] An error occured in the processing of Record Id : " + customerAndGroupAccountListUI.Tbl_CustomerAndGroupAccountId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }