Пример #1
0
    public int DeleteDownPaymentToSupplierDistribution(DownPaymentToSupplierDistributionListUI downPaymentToSupplierDistributionListUI)
    {
        int result = 0;

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

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

                sqlCmd.Parameters.Add("@tbl_DownPaymentToSupplierDistributionId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_DownPaymentToSupplierDistributionId"].Value = downPaymentToSupplierDistributionListUI.Tbl_DownPaymentToSupplierDistributionId;

                result = sqlCmd.ExecuteNonQuery();

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

        return(result);
    }
Пример #2
0
    public int DeleteDownPaymentToSupplierDistribution(DownPaymentToSupplierDistributionListUI downPaymentToSupplierDistributionListUI)
    {
        int result = 0;

        result = downPaymentToSupplierDistributionListDAL.DeleteDownPaymentToSupplierDistribution(downPaymentToSupplierDistributionListUI);
        return(result);
    }
Пример #3
0
    private void BindListBySearchParameters(DownPaymentToSupplierDistributionListUI downPaymentToSupplierDistributionListUI)
    {
        try
        {
            DataTable dtb = downPaymentToSupplierDistributionListBAL.GetDownPaymentToSupplierDistributionListBySearchParameters(downPaymentToSupplierDistributionListUI);


            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_Customer_Down_Payment_DownPaymentFromCustomerDistributionList.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_DownPaymentFromCustomerDistributionList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
Пример #4
0
    public DataTable GetDownPaymentToSupplierDistributionListBySearchParameters(DownPaymentToSupplierDistributionListUI downPaymentToSupplierDistributionListUI)
    {
        DataTable dtb = new DataTable();

        dtb = downPaymentToSupplierDistributionListDAL.GetDownPaymentToSupplierDistributionListBySearchParameters(downPaymentToSupplierDistributionListUI);
        return(dtb);
    }
Пример #5
0
    public DataTable GetDownPaymentToSupplierDistributionListBySearchParameters(DownPaymentToSupplierDistributionListUI downPaymentToSupplierDistributionListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

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

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

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

        return(dtbl);
    }