public int DeleteCustomerInvoiceDistribution(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        int result = 0;

        result = customerInvoiceDistributionListDAL.DeleteCustomerInvoiceDistribution(customerInvoiceDistributionListUI);
        return(result);
    }
    public DataTable GetCustomerInvoiceDistributionListBySearchParameters(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerInvoiceDistributionListDAL.GetCustomerInvoiceDistributionListBySearchParameters(customerInvoiceDistributionListUI);
        return(dtb);
    }
    public DataTable GetCustomerInvoiceDistributionListById(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerInvoiceDistributionListDAL.GetCustomerInvoiceDistributionListById(customerInvoiceDistributionListUI);
        return(dtb);
    }
    private void BindListBySearchParameters(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        try
        {
            DataTable dtb = customerInvoiceDistributionListBAL.GetCustomerInvoiceDistributionListBySearchParameters(this.customerInvoiceDistributionListUI);


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

            log.Error("[Finance_Accounts_Receivable_Customer__Invoice__With_Sales_Order_CustomerInvoiceDistributionList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
Beispiel #5
0
    public DataTable GetCustomerInvoiceDistributionListById(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

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

                sqlCmd.Parameters.Add("@tbl_CustomerInvoiceDistributionId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerInvoiceDistributionId"].Value = customerInvoiceDistributionListUI.Tbl_CustomerInvoiceDistributionId;

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

            log.Error("[CustomerInvoiceDistributionListDAL : getCustomerInvoiceDistributionListById] An error occured in the processing of Record Id : " + customerInvoiceDistributionListUI.Tbl_CustomerInvoiceDistributionId + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
Beispiel #6
0
    public int DeleteCustomerInvoiceDistribution(CustomerInvoiceDistributionListUI customerInvoiceDistributionListUI)
    {
        int result = 0;

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

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

                sqlCmd.Parameters.Add("@tbl_CustomerInvoiceDistributionId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerInvoiceDistributionId"].Value = customerInvoiceDistributionListUI.Tbl_CustomerInvoiceDistributionId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteCustomerInvoiceDistribution()";
            logExcpUIobj.ResourceName     = "CustomerInvoiceDistributionListDAL.CS";
            logExcpUIobj.RecordId         = customerInvoiceDistributionListUI.Tbl_CustomerInvoiceDistributionId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[CustomerInvoiceDistributionListDAL : DeleteCustomerInvoiceDistribution] An error occured in the processing of Record Id : " + customerInvoiceDistributionListUI.Tbl_CustomerInvoiceDistributionId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }