コード例 #1
0
    public int DeleteCustomerInvoice(CustomerInvoiceListUI customerInvoiceListUI)
    {
        int result = 0;

        result = customerInvoiceListDAL.DeleteCustomerInvoice(customerInvoiceListUI);
        return(result);
    }
コード例 #2
0
    public DataTable GetCustomerInvoiceListById(CustomerInvoiceListUI customerInvoiceListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerInvoiceListDAL.GetCustomerInvoiceListById(customerInvoiceListUI);
        return(dtb);
    }
コード例 #3
0
    public DataTable GetCustomerInvoiceListBySearchParameters(CustomerInvoiceListUI customerInvoiceListUI)
    {
        DataTable dtb = new DataTable();

        dtb = customerInvoiceListDAL.GetCustomerInvoiceListBySearchParameters(customerInvoiceListUI);
        return(dtb);
    }
コード例 #4
0
    private void SearchCustomerInvoiceList()
    {
        try
        {
            CustomerInvoiceListUI customerInvoiceListUI = new CustomerInvoiceListUI();
            customerInvoiceListUI.Search = txtCustomerInvoiceSearch.Text;


            DataTable dtb = customerInvoiceListBAL.GetCustomerInvoiceListBySearchParameters(customerInvoiceListUI);

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

            log.Error("[Finance_Bank_Accounting_Customer_Down_Payment_Default : SearchApplytoDocumentList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
コード例 #5
0
    private void BindListBySearchParameters(CustomerInvoiceListUI customerInvoiceListUI)
    {
        try
        {
            DataTable dtb = customerInvoiceListBAL.GetCustomerInvoiceListBySearchParameters(customerInvoiceListUI);


            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     = "System_Settings_customerInvoiceList.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_CustomerInvoiceList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
    private void SearchCustomerInvoiceIdList()
    {
        try
        {
            CustomerInvoiceListUI CustomerInvoiceListUI = new CustomerInvoiceListUI();
            CustomerInvoiceListUI.Search = txtCustomerInvoiceIdSearch.Text;


            DataTable dtb = customerInvoiceListBAL.GetCustomerInvoiceListBySearchParameters(CustomerInvoiceListUI);

            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvCustomerInvoiceIdSearch.DataSource = dtb;
                gvCustomerInvoiceIdSearch.DataBind();
                divCustomerInvoiceIdSearchError.Visible = false;
            }
            else
            {
                divCustomerInvoiceIdSearchError.Visible = true;
                lblCustomerInvoiceIdSearchError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvCustomerInvoiceIdSearch.Visible       = false;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "SearchCustomerInvoiceIdList()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Receivable_Customer__Invoice__With_Sales_Order_CustomerInvoiceDistribution.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_CustomerInvoiceDistribution : SearchCustomerInvoiceIdList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
コード例 #7
0
    public DataTable GetCustomerInvoiceListById(CustomerInvoiceListUI customerInvoiceListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

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

                sqlCmd.Parameters.Add("@tbl_CustomerInvoiceId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerInvoiceId"].Value = customerInvoiceListUI.Tbl_CustomerInvoiceId;

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

            log.Error("[CustomerInvoiceListDAL : getCustomerInvoiceListById] An error occured in the processing of Record Id : " + customerInvoiceListUI.Tbl_CustomerInvoiceId + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
コード例 #8
0
    public int DeleteCustomerInvoice(CustomerInvoiceListUI customerInvoiceListUI)
    {
        int result = 0;

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

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

                sqlCmd.Parameters.Add("@tbl_CustomerInvoiceId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_CustomerInvoiceId"].Value = customerInvoiceListUI.Tbl_CustomerInvoiceId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteCustomerInvoice()";
            logExcpUIobj.ResourceName     = "CustomerInvoiceListDAL.CS";
            logExcpUIobj.RecordId         = customerInvoiceListUI.Tbl_CustomerInvoiceId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[CustomerInvoiceListDAL : DeleteCustomerInvoice] An error occured in the processing of Record Id : " + customerInvoiceListUI.Tbl_CustomerInvoiceId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }