public int DeletePaymentFromCustomer(PaymentFromCustomerListUI PaymentFromCustomerListUI)
    {
        int result = 0;

        result = PaymentFromCustomerListDAL.DeletePaymentFromCustomer(PaymentFromCustomerListUI);
        return(result);
    }
Пример #2
0
    private void SearchCustomerList()
    {
        try
        {
            PaymentFromCustomerListUI paymentFromCustomerListUI = new PaymentFromCustomerListUI();
            CustomerListUI            customerListUI            = new CustomerListUI();
            customerListUI.Search = txtCustomerSearch.Text;
            DataTable dtb = paymentFromCustomerListBAL.GetPaymentFromCustomerListById(paymentFromCustomerListUI);


            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvCustomerSearch.DataSource = dtb;
                gvCustomerSearch.DataBind();
                divCustomerSearchError.Visible = false;
            }
            else
            {
                divCustomerSearchError.Visible = true;
                lblCustomerSearchError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvCustomerSearch.Visible       = false;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "SearchCustomer()";
            logExcpUIobj.ResourceName     = "Finance_Bank_Accounting_Customer_Receipts_PaymentFromCustomerDistributionForm.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Bank_Accounting_Customer_Receipts_PaymentFromCustomerDistributionForm : SearchCustomer] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
    public DataTable GetPaymentFromCustomerListBySearchParameters(PaymentFromCustomerListUI PaymentFromCustomerListUI)
    {
        DataTable dtb = new DataTable();

        dtb = PaymentFromCustomerListDAL.GetPaymentFromCustomerListBySearchParameters(PaymentFromCustomerListUI);
        return(dtb);
    }
    public DataTable GetPaymentFromCustomerListById(PaymentFromCustomerListUI PaymentFromCustomerListUI)
    {
        DataTable dtb = new DataTable();

        dtb = PaymentFromCustomerListDAL.GetPaymentFromCustomerListById(PaymentFromCustomerListUI);
        return(dtb);
    }
    private void BindListBySearchParameters(PaymentFromCustomerListUI paymentFromCustomerListUI)
    {
        try
        {
            DataTable dtb = paymentFromCustomerListBAL.GetPaymentFromCustomerListBySearchParameters(this.paymentFromCustomerListUI);


            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_Bank_Accounting_Payment_From_Customer_PaymentFromCustomerList.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Bank_Accounting_Payment_From_Customer_PaymentFromCustomerList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
Пример #6
0
    public int DeletePaymentFromCustomer(PaymentFromCustomerListUI PaymentFromCustomerListUI)
    {
        int result = 0;

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

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

                sqlCmd.Parameters.Add("@tbl_PaymentFromCustomerId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_PaymentFromCustomerId"].Value = PaymentFromCustomerListUI.Tbl_PaymentFromCustomerId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeletePaymentFromCustomer()";
            logExcpUIobj.ResourceName     = "PaymentFromCustomerListDAL.CS";
            logExcpUIobj.RecordId         = PaymentFromCustomerListUI.Tbl_PaymentFromCustomerId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);
            log.Error("[PaymentFromCustomerListDAL : DeletePaymentFromCustomer] An error occured in the processing of Record Id : " + PaymentFromCustomerListUI.Tbl_PaymentFromCustomerId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }
Пример #7
0
    public DataTable GetPaymentFromCustomerListBySearchParameters(PaymentFromCustomerListUI PaymentFromCustomerListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

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

                sqlCmd.Parameters.Add("@Search", SqlDbType.NVarChar);
                sqlCmd.Parameters["@Search"].Value = PaymentFromCustomerListUI.Search;

                using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd))
                {
                    adapter.Fill(ds);
                }
            }
            if (ds.Tables.Count > 0)
            {
                dtbl = ds.Tables[0];
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "GetPaymentFromCustomerListBySearchParameters()";
            logExcpUIobj.ResourceName     = "PaymentFromCustomerListDAL.CS";
            logExcpUIobj.RecordId         = "Search = " + PaymentFromCustomerListUI.Search;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);
            log.Error("[PaymentFromCustomerListDAL : GetPaymentFromCustomerListBySearchParameters] An error occured in the processing of Record Search = " + PaymentFromCustomerListUI.Search + " . Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }