コード例 #1
0
    public AssetFormDAL()
    {
        try
        {
            GlobalConfigurations objConfig = new GlobalConfigurations();
            objConfig.InitilizeConnectionString();
            connectionString = objConfig.connectionString;
            commandTimeout   = Convert.ToInt32(objConfig.commandTimeout);
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "AssetFormDAL()";
            logExcpUIobj.ResourceName     = "AssetFormDAL.CS";
            logExcpUIobj.RecordId         = "";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            throw new Exception("[AssetFormDAL : AssetFormDAL] ERROR: An error occured while connection to staging database. Please check the connection settings : [" + exp.ToString() + "]");
        }
    }
コード例 #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            budgetFormUI.CreatedBy          = SessionContext.UserGuid;
            budgetFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;
            budgetFormUI.BudgetNumber       = txtBudgetNumber.Text;
            budgetFormUI.Description        = txtDescription.Text;
            budgetFormUI.Opt_BasedOn        = Convert.ToByte(ddlBasedOn.SelectedValue);
            budgetFormUI.Opt_BudgetYear     = Convert.ToByte(ddlBudgetYear.SelectedValue);

            if (chkAnnual.Checked)
            {
                budgetFormUI.AnnualCapital = true;
            }
            else
            {
                budgetFormUI.AnnualCapital = false;
            }

            budgetFormUI.Tbl_GLAccountId = txtGLAccountGuid.Text;

            if (ChkDisplay.Checked)
            {
                budgetFormUI.Display = true;
            }
            else
            {
                budgetFormUI.Display = false;
            }
            if (budgetFormBAL.AddBudget(budgetFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_BudgetForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_BudgetForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #3
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox ch;

        try
        {
            for (int i = 0; i < gvData.Items.Count; i++)
            {
                ch = (CheckBox)gvData.Items[i].Cells[0].FindControl("chkRow");
                if (ch.Checked == true)
                {
                    assetBookSetupListUI.Tbl_AssetBookSetupId = gvData.Items[i].Cells[1].Text;

                    if (assetBookSetupListBAL.DeleteAssetBookSetup(assetBookSetupListUI) == 1)
                    {
                        webserviceDelete();
                        divSuccess.Visible = true;
                        divError.Visible   = false;
                        lblSuccess.Text    = Resources.GlobalResource.msgRecordDeleteSuccessfully;
                    }
                    else
                    {
                        divError.Visible   = true;
                        divSuccess.Visible = false;
                        lblError.Text      = Resources.GlobalResource.msgCouldNotDeleteRecord;
                    }
                }
            }
            BindList();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnDelete_Click()";
            logExcpUIobj.ResourceName     = "Assets_AssetBookSetup_AssetBookSetupList.CS";
            logExcpUIobj.RecordId         = assetBookSetupListUI.Tbl_AssetBookSetupId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Assets_AssetBookSetup_AssetBookSetupList : btnDelete_Click] An error occured in the processing of Record Id : " + assetBookSetupListUI.Tbl_AssetBookSetupId + ". Details : [" + exp.ToString() + "]");
        }
    }
コード例 #4
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox ch;

        try
        {
            for (int i = 0; i < gvData.Items.Count; i++)
            {
                ch = (CheckBox)gvData.Items[i].Cells[0].FindControl("chkRow");
                if (ch.Checked == true)
                {
                    customerInvoiceListUI.Tbl_CustomerInvoiceId = gvData.Items[i].Cells[1].Text;

                    if (customerInvoiceListBAL.DeleteCustomerInvoice(customerInvoiceListUI) == 1)
                    {
                        divSuccess.Visible = true;
                        divError.Visible   = false;

                        lblSuccess.Text = Resources.GlobalResource.msgRecordDeleteSuccessfully;
                    }
                    else
                    {
                        divError.Visible   = true;
                        divSuccess.Visible = false;
                        lblError.Text      = Resources.GlobalResource.msgCouldNotDeleteRecord;
                    }
                }
            }
            BindList();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnDelete_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_customerInvoiceList.CS";
            logExcpUIobj.RecordId         = customerInvoiceListUI.Tbl_CustomerInvoiceId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Receivable_Customer__Invoice__With_Sales_Order_CustomerInvoiceList : btnDelete_Click] An error occured in the processing of Record Id : " + customerInvoiceListUI.Tbl_CustomerInvoiceId + ". Details : [" + exp.ToString() + "]");
        }
    }
コード例 #5
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            segment07FormUI.CreatedBy          = SessionContext.UserGuid;
            segment07FormUI.Tbl_OrganizationId = SessionContext.OrganizationId;
            segment07FormUI.Number             = txtNumber.Text;
            segment07FormUI.Description        = txtDescription.Text;
            segment07FormUI.Tbl_Segment01Id    = ddlSegment01.SelectedValue.ToString();
            segment07FormUI.Tbl_Segment02Id    = ddlSegment02.SelectedValue.ToString();
            segment07FormUI.Tbl_Segment03Id    = ddlSegment03.SelectedValue.ToString();
            segment07FormUI.Tbl_Segment04Id    = ddlSegment04.SelectedValue.ToString();
            segment07FormUI.Tbl_Segment05Id    = ddlSegment05.SelectedValue.ToString();
            segment07FormUI.Tbl_Segment06Id    = ddlSegment06.SelectedValue.ToString();
            if (segment07FormBAL.AddSegment07(segment07FormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
                Clear();
            }
            else
            {
                divSuccess.Visible = false;
                divError.Visible   = true;
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_Segment07Form.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_Segment07Form : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #6
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            physicalLocationFormUI.CreatedBy          = SessionContext.UserGuid;
            physicalLocationFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;
            physicalLocationFormUI.Description        = txtDescription.Text;
            physicalLocationFormUI.LastInventoryDate  = DateTime.Parse(txtLastInventoryDate.Text);
            physicalLocationFormUI.Tbl_LocationId     = txtLocationGuid.Text;
            if (physicalLocationFormBAL.AddPhysicalLocation(physicalLocationFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }

            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible   = true;
                divSuccess.Visible = false;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "PhysicalLocation_PhysicalLocationForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);
            log.Error("[PhysicalLocation_PhysicalLocationForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #7
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox ch;

        try
        {
            for (int i = 0; i < gvData.Items.Count; i++)
            {
                ch = (CheckBox)gvData.Items[i].Cells[0].FindControl("chkRow");
                if (ch.Checked == true)
                {
                    fiscalPeriodListUI.Tbl_FiscalPeriodId = gvData.Items[i].Cells[1].Text;

                    if (fiscalPeriodListBAL.DeleteFiscalPeriod(fiscalPeriodListUI) == 1)
                    {
                        divSuccess.Visible = true;
                        divError.Visible   = false;
                        lblSuccess.Text    = Resources.GlobalResource.msgRecordDeleteSuccessfully;
                    }
                    else
                    {
                        divError.Visible   = true;
                        divSuccess.Visible = false;
                        lblError.Text      = Resources.GlobalResource.msgCouldNotDeleteRecord;
                    }
                }
            }
            BindList();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnDelete_Click()";
            logExcpUIobj.ResourceName     = "Reporting_Balance_Sheet_Supplier_Masters_FiscalPeriodList.CS";
            logExcpUIobj.RecordId         = fiscalPeriodListUI.Tbl_FiscalPeriodId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Reporting_Balance_Sheet_Supplier_Masters_FiscalPeriodList : btnDelete_Click] An error occured in the processing of Record Id : " + fiscalPeriodListUI.Tbl_FiscalPeriodId + ". Details : [" + exp.ToString() + "]");
        }
    }
コード例 #8
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox ch;

        try
        {
            for (int i = 0; i < gvData.Items.Count; i++)
            {
                ch = (CheckBox)gvData.Items[i].Cells[0].FindControl("chkRow");
                if (ch.Checked == true)
                {
                    downPaymentToSupplierDistributionListUI.Tbl_DownPaymentToSupplierDistributionId = gvData.Items[i].Cells[1].Text;

                    if (downPaymentToSupplierDistributionListBAL.DeleteDownPaymentToSupplierDistribution(downPaymentToSupplierDistributionListUI) == 1)
                    {
                        divSuccess.Visible = true;
                        divError.Visible   = false;
                        lblSuccess.Text    = Resources.GlobalResource.msgRecordDeleteSuccessfully;
                    }
                    else
                    {
                        divError.Visible   = true;
                        divSuccess.Visible = false;
                        lblError.Text      = Resources.GlobalResource.msgCouldNotDeleteRecord;
                    }
                }
            }
            BindList();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnDelete_Click()";
            logExcpUIobj.ResourceName     = "Finance_Bank_Accounting_Customer_Down_Payment_DownPaymentFromCustomerDistributionList.CS";
            logExcpUIobj.RecordId         = downPaymentToSupplierDistributionListUI.Tbl_DownPaymentToSupplierDistributionId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Bank_Accounting_Customer_Down_Payment_DownPaymentFromCustomerDistributionList : btnDelete_Click] An error occured in the processing of Record Id : " + downPaymentToSupplierDistributionListUI.Tbl_DownPaymentToSupplierDistributionId + ". Details : [" + exp.ToString() + "]");
        }
    }
コード例 #9
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            pODetailsFormUI.CreatedBy              = SessionContext.UserGuid;
            pODetailsFormUI.Tbl_OrganizationId     = SessionContext.OrganizationId;
            pODetailsFormUI.Tbl_POId               = txtPOIdGuid.Text;
            pODetailsFormUI.Tbl_AssetId_FixedAsset = txtAssetIdGuid.Text;
            pODetailsFormUI.UOM              = txtUOM.Text;
            pODetailsFormUI.Description      = txtDescription.Text;
            pODetailsFormUI.Tbl_LocationId   = txtLocationGuid.Text;
            pODetailsFormUI.QuantityOrdered  = Convert.ToDecimal(txtQuantityOrdered.Text);
            pODetailsFormUI.QuantityCanceled = Convert.ToDecimal(txtQuantityCanceled.Text);
            pODetailsFormUI.UnitCost         = Convert.ToDecimal(txtUnitCost.Text);
            pODetailsFormUI.ExtendedCost     = Convert.ToDecimal(txtUnitCost.Text);
            if (pODetailsFormBAL.AddPODetails(pODetailsFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Payable_PO_PODetailsForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Payable_PO_PODetailsForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #10
0
    public string DateInTextBox(string value)
    {
        string dateString = string.Empty;

        try
        {
            var dateValue = DateTime.Parse(value);
            dateString = dateValue.ToString("dd/MM/yyyy");
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "dateInTextBox()";
            logExcpUIobj.ResourceName     = "CommonClasses.CS";
            logExcpUIobj.RecordId         = "";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[CommonClasses : dateInTextBox] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }

        return(dateString);
    }
コード例 #11
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        CheckBox ch;

        for (int i = 0; i < gvData.Items.Count; i++)
        {
            ch = (CheckBox)gvData.Items[i].Cells[0].FindControl("chkrow");
            if (ch.Checked == true)
            {
                try
                {
                    organizationListUI.Tbl_OrganizationId = gvData.Items[i].Cells[1].Text;

                    if (organizationListBAL.DeleteOrganization(organizationListUI) == 1)
                    {
                        BindOrganizationList();
                        divSuccess.Visible = true;
                        lblSuccess.Text    = Resources.GlobalResource.msgRecordDeleteSuccessfully;
                    }
                    else
                    {
                        divError.Visible = true;
                        lblError.Text    = Resources.GlobalResource.msgCouldNotUpdateRecord;
                    }
                }
                catch (Exception exp)
                {
                    logExcpUIobj.MethodName       = "btnDelete_Click()";
                    logExcpUIobj.ResourceName     = "System_Settings_OrganizationList.CS";
                    logExcpUIobj.RecordId         = organizationListUI.Tbl_OrganizationId;
                    logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
                    logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

                    log.Error("[System_Settings_OrganizationList : btnDelete_Click] An error occured in the processing of Record Id : " + organizationListUI.Tbl_OrganizationId + ". Details : [" + exp.ToString() + "]");
                }
            }
        }
    }
コード例 #12
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            nonPOBasedInvoiceDistributionFormUI.CreatedBy          = SessionContext.UserGuid;
            nonPOBasedInvoiceDistributionFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            nonPOBasedInvoiceDistributionFormUI.Tbl_NonPOBasedInvoiceId = txtNonPOBasedInvoiceIdGuid.Text;
            nonPOBasedInvoiceDistributionFormUI.Tbl_GLAccountId         = txtGLAccountGuid.Text;
            nonPOBasedInvoiceDistributionFormUI.Opt_GLAccountType       = Convert.ToInt16(ddlOpt_GLAccountType.SelectedValue);
            nonPOBasedInvoiceDistributionFormUI.Description             = txtDescription.Text;
            nonPOBasedInvoiceDistributionFormUI.DistributionReference   = txtDistributionReference.Text;
            nonPOBasedInvoiceDistributionFormUI.Debit             = Convert.ToDecimal(txtDebit.Text);
            nonPOBasedInvoiceDistributionFormUI.Credit            = Convert.ToDecimal(txtCredit.Text);
            nonPOBasedInvoiceDistributionFormUI.OriginatingDebit  = Convert.ToDecimal(txtOriginatingDebit.Text);
            nonPOBasedInvoiceDistributionFormUI.OriginatingCredit = Convert.ToDecimal(txtCredit.Text);
            nonPOBasedInvoiceDistributionFormUI.ExchangeRate      = Convert.ToDecimal(txtExchangeRate.Text);

            if (nonPOBasedInvoiceDistributionFormBAL.AddNonPOBasedInvoiceDistribution(nonPOBasedInvoiceDistributionFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Payable_Non_PO_Based_Invoice_NonPOBasedInvoiceDistributionForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Payable_Non_PO_Based_Invoice_NonPOBasedInvoiceDistributionForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #13
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            assetBookSetupFormUI.CreatedBy              = SessionContext.UserGuid;
            assetBookSetupFormUI.Tbl_OrganizationId     = SessionContext.OrganizationId;
            assetBookSetupFormUI.AssetBookSetupCode     = txtAssetBookSetupCode.Text;
            assetBookSetupFormUI.Description            = txtDescription.Text;
            assetBookSetupFormUI.opt_CurrentyFiscalYear = int.Parse(ddlopt_CurrentyFiscalYear.SelectedValue.ToString());
            assetBookSetupFormUI.opt_DepreciatedPeriod  = int.Parse(ddlopt_DepreciatedPeriod.SelectedValue.ToString());



            if (assetBookSetupFormBAL.AddAssetBookSetup(assetBookSetupFormUI) == 1)
            {
                divSuccess.Visible = true;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text    = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Assets_AssetBookSetup_AssetBookSetupForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Assets_AssetBookSetup_AssetBookSetupForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #14
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            InvoiceAndOrderTypeFormUI invoiceAndOrderTypeFormUI = new InvoiceAndOrderTypeFormUI();
            invoiceAndOrderTypeFormUI.CreatedBy               = SessionContext.UserGuid;
            invoiceAndOrderTypeFormUI.Tbl_OrganizationId      = SessionContext.OrganizationId;
            invoiceAndOrderTypeFormUI.Number                  = txtInvNo.Text;
            invoiceAndOrderTypeFormUI.Opt_InvoiceAndOrderType = int.Parse(ddlOpt_InvoiceAndOrderType.SelectedValue.ToString());

            if (invoiceAndOrderTypeFormBAL.AddInvoiceAndOrderType(invoiceAndOrderTypeFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_InvoiceAndOrderTypeForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_InvoiceAndOrderTypeForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #15
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            assetPurchaseDistributionFormUI.CreatedBy             = SessionContext.UserGuid;
            assetPurchaseDistributionFormUI.Tbl_OrganizationId    = SessionContext.OrganizationId;
            assetPurchaseDistributionFormUI.Tbl_AssetPurchaseId   = txtAssetPurchaseGuid.Text;
            assetPurchaseDistributionFormUI.Tbl_GLAccountId       = txtGLAccountGuid.Text;
            assetPurchaseDistributionFormUI.opt_GLAccountType     = int.Parse(ddlopt_GLAccountType.SelectedValue);
            assetPurchaseDistributionFormUI.Description           = txtDescription.Text;
            assetPurchaseDistributionFormUI.DistributionReference = txtDistributionReference.Text;
            assetPurchaseDistributionFormUI.Debit  = Decimal.Parse(txtDebit.Text);
            assetPurchaseDistributionFormUI.Credit = Decimal.Parse(txtCredit.Text);
            if (assetPurchaseDistributionFormBAL.AddAssetPurchaseDistribution(assetPurchaseDistributionFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Asset_Purchase_AssetPurchaseDistributionForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Asset_Purchase_AssetPurchaseDistributionForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #16
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            gLAccountSummaryDetailsFormUI.CreatedBy          = SessionContext.UserGuid;
            gLAccountSummaryDetailsFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            gLAccountSummaryDetailsFormUI.Tbl_GLAccountSummaryId = txtGLAccountSummaryGuid.Text;
            gLAccountSummaryDetailsFormUI.Tbl_FiscalPeriodId     = txtFiscalPeriodGuid.Text;
            gLAccountSummaryDetailsFormUI.Period              = Convert.ToInt32(txtPeriod.Text);
            gLAccountSummaryDetailsFormUI.PeriodName          = txtPeriodName.Text;
            gLAccountSummaryDetailsFormUI.PeriodDate          = Convert.ToDateTime(txtPeriodDate.Text);
            gLAccountSummaryDetailsFormUI.DebitAmount         = Convert.ToDecimal(txtDebitAmount.Text);
            gLAccountSummaryDetailsFormUI.CreditAmount        = Convert.ToDecimal(txtCreditAmount.Text);
            gLAccountSummaryDetailsFormUI.NetChageAmount      = Convert.ToDecimal(txtNetChargeAmount.Text);
            gLAccountSummaryDetailsFormUI.PeriodBalanceAmount = Convert.ToDecimal(txtNetChargeAmount.Text);

            if (gLAccountSummaryDetailsFormBAL.AddGLAccountSummaryDetails(gLAccountSummaryDetailsFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                divError.Visible   = true;
                divSuccess.Visible = false;
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_General_Ledger_GL_Integration_GLAccountSummaryForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_General_Ledger_GL_Integration_GLAccountSummaryForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #17
0
    public DataTable GetEmployeeGeneralExpensesList()
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

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

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

            log.Error("[EmployeeGeneralExpensesListDAL : GetEmployeeGeneralExpensesListById] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
コード例 #18
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            gLAccountEntryDetailsFormUI.CreatedBy            = SessionContext.UserGuid;
            gLAccountEntryDetailsFormUI.Tbl_OrganizationId   = SessionContext.OrganizationId;
            gLAccountEntryDetailsFormUI.Tbl_GLAccountEntryId = txtGLAccountEntryGuid.Text;
            gLAccountEntryDetailsFormUI.Tbl_GLAccountId      = txtGLAccountGuid.Text;

            gLAccountEntryDetailsFormUI.Debit  = Convert.ToDecimal(txtDebit.Text.ToString());
            gLAccountEntryDetailsFormUI.Credit = Convert.ToDecimal(txtCredit.Text.ToString());

            if (gLAccountEntryDetailsFormBAL.AddGLAccountEntryDetails(gLAccountEntryDetailsFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_BudgetForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_GLAccountEntryDetailsForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #19
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            bankFormUI.CreatedBy          = SessionContext.UserGuid;
            bankFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            bankFormUI.BankCode      = txtBankCode.Text;
            bankFormUI.BankName      = txtBankName.Text;
            bankFormUI.Address       = txtAddress.Text;
            bankFormUI.City          = txtCity.Text;
            bankFormUI.State         = txtState.Text;
            bankFormUI.ZipCode       = txtZipCode.Text;
            bankFormUI.Tbl_CountryId = txtCountryGuid.Text;
            bankFormUI.Phone         = txtPhone.Text;
            bankFormUI.Mobile        = txtMobile.Text;
            bankFormUI.Fax           = txtFax.Text;
            bankFormUI.Branch        = txtBranch.Text;
            bankFormUI.IBAN          = txtIban.Text;



            if (bankFormBAL.AddBank(bankFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                divError.Visible   = true;
                divSuccess.Visible = false;
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_BankForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_BankForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #20
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            optionSetFormUI.CreatedBy          = SessionContext.UserGuid;
            optionSetFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            optionSetFormUI.TableName            = txtTableName.Text;
            optionSetFormUI.ParentOptionSetValue = txtParentOptionSetValue.Text;
            optionSetFormUI.OptionSetName        = txtOptionSetName.Text;
            optionSetFormUI.OptionSetValue       = Convert.ToInt64(txtOptionSetValue.Text);
            optionSetFormUI.OptionSetLable       = txtOptionSetLable.Text;
            optionSetFormUI.TableObjectId        = ddlTables.SelectedValue;
            optionSetFormUI.ColumnId             = ddlColoumnByTable.SelectedValue;



            if (optionSetFormBAL.AddOptionSet(optionSetFormUI) == 1)
            {
                divSuccess.Visible = true;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text    = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_OptionSetForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_OptionSetForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #21
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            assetDisposalDetailsFormUI.CreatedBy           = SessionContext.UserGuid;
            assetDisposalDetailsFormUI.Tbl_OrganizationId  = SessionContext.OrganizationId;
            assetDisposalDetailsFormUI.Tbl_AssetDisposalId = txtAssetDisposalGuid.Text;
            assetDisposalDetailsFormUI.Quantity            = Decimal.Parse(txtQuantity.Text);
            assetDisposalDetailsFormUI.Cost              = Decimal.Parse(txtCost.Text);
            assetDisposalDetailsFormUI.Percent           = Decimal.Parse(txtPercent.Text);
            assetDisposalDetailsFormUI.CashProceeds      = Decimal.Parse(txtCashProceeds.Text);
            assetDisposalDetailsFormUI.NonCashProceeds   = Decimal.Parse(txtNonCashProceeds.Text);
            assetDisposalDetailsFormUI.ExpensesOfSales   = Decimal.Parse(txtExpensesOfSales.Text);
            assetDisposalDetailsFormUI.OriginatingAmount = Decimal.Parse(txtOriginatingAmount.Text);
            if (assetDisposalDetailsFormBAL.AddAssetDisposalDetails(assetDisposalDetailsFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Asset__Accounting_Disposal_of_Assets_AssetDisposalDetailsForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Asset__Accounting_Disposal_of_Assets_AssetDisposalDetailsForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #22
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         pOBasedInvoiceFormUI.CreatedBy           = SessionContext.UserGuid;
         pOBasedInvoiceFormUI.Tbl_OrganizationId  = SessionContext.OrganizationId;
         pOBasedInvoiceFormUI.Tbl_BatchId         = txtBatchGuid.Text;
         pOBasedInvoiceFormUI.Tbl_CurrencyId      = txtCurrencyGuid.Text;
         pOBasedInvoiceFormUI.Tbl_SupplierId      = txtSupplierGuid.Text;
         pOBasedInvoiceFormUI.Tbl_PaymentTermsId  = txtPaymentTermsGuid.Text;
         pOBasedInvoiceFormUI.ReceiptNumber       = txtReceiptNumber.Text;
         pOBasedInvoiceFormUI.PostingDate         = DateTime.Parse(txtPostingDate.Text);
         pOBasedInvoiceFormUI.SubTotalAmount      = Convert.ToDecimal(txtSubTotalAmount.Text);
         pOBasedInvoiceFormUI.TradeDiscountAmount = Convert.ToDecimal(txtTradeDiscountAmount.Text);
         pOBasedInvoiceFormUI.FreightAmount       = Convert.ToDecimal(txtFreightAmount.Text);
         pOBasedInvoiceFormUI.TotalAmount         = Convert.ToDecimal(txtTotalAmount.Text);
         pOBasedInvoiceFormUI.InvoiceDate         = DateTime.Parse(txtInvoiceDate.Text);
         if (pOBasedInvoiceFormBAL.AddPOBasedInvoice(pOBasedInvoiceFormUI) == 1)
         {
             divSuccess.Visible = true;
             divError.Visible   = false;
             lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
             this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
         }
         else
         {
             lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
             divError.Visible   = true;
             divSuccess.Visible = false;
             this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
         }
     }
     catch (Exception exp)
     {
         logExcpUIobj.MethodName       = "btnSave_Click()";
         logExcpUIobj.ResourceName     = "Finance_Accounts_Payable_PO_Based_Invoice_POBasedInvoiceForm.CS";
         logExcpUIobj.RecordId         = "New Record";
         logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
         logExcpDALobj.SaveExceptionToDB(logExcpUIobj);
         log.Error("[Finance_Accounts_Payable_PO_Based_Invoice_POBasedInvoiceForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
     }
 }
コード例 #23
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            paymentFromCustomerDistributionFormUI.CreatedBy                 = SessionContext.UserGuid;
            paymentFromCustomerDistributionFormUI.Tbl_OrganizationId        = SessionContext.OrganizationId;
            paymentFromCustomerDistributionFormUI.Tbl_PaymentFromCustomerId = txtCustomerGuid.Text.Trim();
            paymentFromCustomerDistributionFormUI.Tbl_GLAccountId           = txtGLAccountGuid.Text.Trim();
            int type = Convert.ToInt32(ddlOptionType.SelectedValue);
            paymentFromCustomerDistributionFormUI.opt_Type = int.Parse(ddlOptionType.SelectedValue);

            if (type == 2)
            {
                paymentFromCustomerDistributionFormUI.Debit            = Convert.ToDecimal(txtDebit.Text);
                paymentFromCustomerDistributionFormUI.OriginatingDebit = Convert.ToDecimal(txtOriginatingDebit.Text);
            }
            else
            {
                paymentFromCustomerDistributionFormUI.Debit            = 0;
                paymentFromCustomerDistributionFormUI.OriginatingDebit = 0;
            }

            if (type == 1)
            {
                paymentFromCustomerDistributionFormUI.Credit            = Convert.ToDecimal(txtCredit.Text);
                paymentFromCustomerDistributionFormUI.OriginatingCredit = Convert.ToDecimal(txtOriginatingCredit.Text);
            }
            else
            {
                paymentFromCustomerDistributionFormUI.Credit            = 0;
                paymentFromCustomerDistributionFormUI.OriginatingCredit = 0;
            }
            paymentFromCustomerDistributionFormUI.Description           = txtDescription.Text;
            paymentFromCustomerDistributionFormUI.DistributionReference = txtDistributionReference.Text.Trim();

            if (paymentFromCustomerDistributionFormBAL.AddPaymentFromCustomerDistribution(paymentFromCustomerDistributionFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Bank_Accounting_Customer_Receipts_PaymentFromCustomerDistributionForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Bank_Accounting_Customer_Receipts_PaymentFromCustomerDistributionForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #24
0
    public void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            assetFormUI.CreatedBy                  = SessionContext.UserGuid;
            assetFormUI.Tbl_OrganizationId         = SessionContext.OrganizationId;
            assetFormUI.AssetCode                  = txtAssetCode.Text;
            assetFormUI.Description                = txtDescription.Text;
            assetFormUI.ExtendedDescription        = txtExtendedDescription.Text;
            assetFormUI.ShortName                  = txtShortName.Text;
            assetFormUI.Tbl_AssetGroupId           = txtAssetGroupGuid.Text;
            assetFormUI.opt_Type                   = int.Parse(ddlopt_Status.SelectedValue.ToString());
            assetFormUI.Tbl_AssetAndGroupAccountId = txtAssetAndGroupAccountGuid.Text;
            assetFormUI.AcquisitionDate            = DateTime.Parse(txtAcquisitionDate.Text.ToString());
            assetFormUI.AcquisitionCost            = Convert.ToDecimal(txtAcquisitionCost.Text);
            assetFormUI.Tbl_CurrencyId             = txtCurrencyGuid.Text;
            assetFormUI.Tbl_LocationId             = txtLocationGuid.Text;
            assetFormUI.Tbl_PhysicalLocationId     = txtPhysicalLocationGuid.Text;
            assetFormUI.AssetBarcode               = txtAssetBarcode.Text;
            assetFormUI.Tbl_StructureId            = txtStructureGuid.Text;
            assetFormUI.Tbl_EmployeeId             = txtEmployeeGuid.Text;
            assetFormUI.ManufacturerName           = txtManufacturerName.Text;
            assetFormUI.Quantity                   = Convert.ToDecimal(txtQuantity.Text);
            assetFormUI.LastMaintenanceDate        = DateTime.Parse(txtLastMaintenanceDate.Text);
            assetFormUI.DateAdded                  = DateTime.Parse(txtDateAdded.Text);
            assetFormUI.opt_Status                 = int.Parse(ddlopt_Status.SelectedValue.ToString());
            assetFormUI.SerialNumber               = txtSerialNumber.Text;
            assetFormUI.ModalNumber                = txtModalNumber.Text;
            assetFormUI.WarrantyDate               = DateTime.Parse(txtWarrantyDate.Text);
            if (assetFormBAL.AddAsset(assetFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordUpdatedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                divError.Visible   = true;
                divSuccess.Visible = false;
                lblError.Text      = Resources.GlobalResource.msgCouldNotUpdateRecord;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Assets_Asset_AssetForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Assets_Asset_AssetForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #25
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            int payablesType = Convert.ToInt32(ddlOpt_PayablesType.SelectedValue);
            int ProcessType  = Convert.ToByte(ddlOpt_ProcessType.SelectedValue);

            int bank   = (int)Enums.CommonEnum.Payabletype.BankTransfer;
            int Cheque = (int)Enums.CommonEnum.Payabletype.Cheque;
            int Cash   = (int)Enums.CommonEnum.Payabletype.Cash;
            int card   = (int)Enums.CommonEnum.Payabletype.CreditCard;

            int Sales    = (int)Enums.CommonEnum.ProcessType.Sales;
            int Purchase = (int)Enums.CommonEnum.ProcessType.Purchase;


            payablesFormUI.CreatedBy          = SessionContext.UserGuid;
            payablesFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;
            payablesFormUI.Opt_PayablesType   = payablesType;
            payablesFormUI.Opt_ProcessType    = Convert.ToByte(ddlOpt_ProcessType.SelectedValue);


            if (payablesType == bank)
            {
                payablesFormUI.Tbl_Bank_AccountId = txtBankGuid.Text.Trim().ToString();
            }
            else
            {
                payablesFormUI.Tbl_Bank_AccountId = null;
            }


            if (payablesType == Cheque)
            {
                payablesFormUI.ChequeNumber = txtChequeNumber.Text.Trim().ToString();
            }

            else
            {
                payablesFormUI.ChequeNumber = null;
            }


            if (payablesType == Cash)
            {
                payablesFormUI.Tbl_Bank_AccountId = null;
                payablesFormUI.Tbl_CardId         = null;
                payablesFormUI.ChequeNumber       = null;
            }
            if (payablesType == card)
            {
                payablesFormUI.Tbl_CardId = txtCreditCardGuid.Text.Trim().ToString();
            }

            else
            {
                payablesFormUI.Tbl_CardId = null;
            }

            payablesFormUI.DocumentNumber = txtDocumentNumber.Text.Trim().ToString();
            if (ProcessType == Sales)
            {
                payablesFormUI.ReceiptNumber = txtReceiptNumber.Text.Trim().ToString();
            }
            payablesFormUI.PaymentNumber = null;
            if (ProcessType == Purchase)
            {
                payablesFormUI.PaymentNumber = txtPaymentNumber.Text.Trim().ToString();
            }
            payablesFormUI.ReceiptNumber = null;

            if (txtPayablesDate.Text != "")
            {
                payablesFormUI.PayablesDate = DateTime.Parse(txtPayablesDate.Text.ToString());
            }



            if (payablesFormBAL.AddPayables(payablesFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible   = true;
                divSuccess.Visible = false;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_PayablesForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_PayablesForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #26
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        CustomerFormUI customerFormUI = new CustomerFormUI();

        try
        {
            customerFormUI.CreatedBy          = SessionContext.UserGuid;
            customerFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            customerFormUI.CustomerCode  = txtCustomerCode.Text;
            customerFormUI.Name          = txtName.Text;
            customerFormUI.ShortName     = txtShortName.Text;
            customerFormUI.StatementName = txtStatementName.Text;
            customerFormUI.Contact       = txtContact.Text;
            customerFormUI.Address       = txtAddress.Text;
            customerFormUI.City          = txtCity.Text;
            customerFormUI.ZipCode       = txtZipCode.Text;

            customerFormUI.Tbl_CountryId       = txtCountryGuid.Text;
            customerFormUI.Phone               = txtPhone.Text;
            customerFormUI.Mobile              = txtMobile.Text;
            customerFormUI.FaxNo               = txtFaxNo.Text;
            customerFormUI.Email               = txtEmail.Text;
            customerFormUI.Comment1            = txtComment1.Text;
            customerFormUI.Comment2            = txtComment2.Text;
            customerFormUI.Opt_Status          = Convert.ToInt32(ddlStatus.SelectedValue);
            customerFormUI.Tbl_CustomerGroupId = txtCustomerGroupGuid.Text;

            if (chkOnHold.Checked == true)
            {
                customerFormUI.OnHold = true;
            }
            else
            {
                customerFormUI.OnHold = false;
            }


            if (customerFormBAL.AddCustomer(customerFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                divSuccess.Visible = false;
                divError.Visible   = true;
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_BatchForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_BatchForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #27
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        OrganizationFormUI organizationFormUI = new OrganizationFormUI();

        try
        {
            //=====>>>IMAGE UPLOAD<<<<=============
            Byte[] imgByte = null;

            if (fuLogo.PostedFile != null)
            {
                //To create a PostedFile
                HttpPostedFile File = fuLogo.PostedFile;
                //Create byte Array with file len
                imgByte = new Byte[File.ContentLength];
                //force the control to load data in array
                File.InputStream.Read(imgByte, 0, File.ContentLength);
            }

            organizationFormUI.CreatedBy = SessionContext.UserGuid;
            organizationFormUI.Tbl_OrganizationTypeId = ddlOrganizationType.SelectedValue.ToString();
            organizationFormUI.OrganizationCode       = txtCode.Text.Trim();
            organizationFormUI.Name       = txtName.Text.Trim();
            organizationFormUI.Address    = txtAddress.Text.Trim();
            organizationFormUI.City       = txtCity.Text.Trim();
            organizationFormUI.State      = txtState.Text.Trim();
            organizationFormUI.PostalCode = txtPostalCode.Text.Trim();

            organizationFormUI.Tbl_CountryId = lblCountryGuid.Text;

            organizationFormUI.PhoneNo = txtPhone.Text.Trim();
            organizationFormUI.FaxNo   = txtFax.Text.Trim();
            organizationFormUI.Mobile  = txtMobile.Text.Trim();
            organizationFormUI.WebSite = txtWebsite.Text.Trim();
            organizationFormUI.Email   = txtEmail.Text.Trim();
            organizationFormUI.Owner   = txtOwner.Text.Trim();
            organizationFormUI.Logo    = imgByte;

            if (organizationFormBAL.AddOrganization(organizationFormUI) == 1)
            {
                divSuccess.Visible = true;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text    = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible = true;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "System_Settings_OrganizationForm.CS";
            logExcpUIobj.RecordId         = "";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_OrganizationForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #28
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            customerInvoiceProcessFormUI.CreatedBy          = SessionContext.UserGuid;
            customerInvoiceProcessFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;
            customerInvoiceProcessFormUI.Opt_DocumentType   = Convert.ToByte(ddlOpt_DocumentType.SelectedValue);
            customerInvoiceProcessFormUI.Tbl_BatchId        = txtBatchGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.DocumentNumber     = txtDocumentNumber.Text.Trim().ToString();
            customerInvoiceProcessFormUI.DocumentDate       = DateTime.Parse(txtDocumentDate.Text.ToString());
            customerInvoiceProcessFormUI.Description        = txtDescription.Text.ToString();
            customerInvoiceProcessFormUI.PostingDate        = DateTime.Parse(txtPostingDate.Text.ToString());
            customerInvoiceProcessFormUI.InvoiceDate        = DateTime.Parse(txtInvoiceDate.Text.ToString());
            customerInvoiceProcessFormUI.InvoiceIssueDate   = DateTime.Parse(txtInvoiceIssueDate.Text.ToString());
            customerInvoiceProcessFormUI.Tbl_CustomerId     = txtCustomerGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.Tbl_CurrencyId     = txtCurrencyGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.Tbl_PaymentTermsId = txtPaymentTermseGuid.Text.ToString();
            customerInvoiceProcessFormUI.PONumber           = txtPONumber.Text.ToString();
            customerInvoiceProcessFormUI.Cost          = Convert.ToDecimal(txtCost.Text);
            customerInvoiceProcessFormUI.Sales         = Convert.ToDecimal(txtSales.Text);
            customerInvoiceProcessFormUI.TradeDiscount = Convert.ToDecimal(txtTradeDiscount.Text);
            customerInvoiceProcessFormUI.Freight       = Convert.ToDecimal(txtFreight.Text);
            customerInvoiceProcessFormUI.Total         = Convert.ToDecimal(txtTotal.Text);
            customerInvoiceProcessFormUI.Tbl_PayablesId_BankTransfer = txtPayablesBankGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.BankTransferAmount          = Convert.ToDecimal(txtBankTransferAmount.Text);
            customerInvoiceProcessFormUI.Tbl_PayablesId_Cash         = txtPayablesCashGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.CashAmount                = Convert.ToDecimal(txtCash.Text);
            customerInvoiceProcessFormUI.Tbl_PayablesId_Cheque     = txtPayablesChequeGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.ChequeAmount              = Convert.ToDecimal(txtCheque.Text);
            customerInvoiceProcessFormUI.Tbl_PayablesId_CreditCard = txtPayablesCreditCardGuid.Text.Trim().ToString();
            customerInvoiceProcessFormUI.CreditCardAmount          = Convert.ToDecimal(txtCreditCard.Text);
            customerInvoiceProcessFormUI.OnAccount = Convert.ToDecimal(txtOnAccount.Text);

            if (customerInvoiceProcessFormBAL.AddCustomerInvoiceProcess(customerInvoiceProcessFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divError.Visible   = true;
                divSuccess.Visible = false;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Receivable_Customer_Invoice_Processing__Services_CustomerInvoiceProcessForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Receivable_Customer_Invoice_Processing__Services_CustomerInvoiceProcessForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #29
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int applyToDocumentCustomerInvoice        = 1;
        int applyToDocumentCustomerInvoiceProcess = 2;


        try
        {
            downPaymentFromCustomerApplyFormUI.CreatedBy                     = SessionContext.UserGuid;
            downPaymentFromCustomerApplyFormUI.Tbl_OrganizationId            = SessionContext.OrganizationId;
            downPaymentFromCustomerApplyFormUI.Tbl_DownPaymentFromCustomerId = txtDownPaymentcustGuid.Text;
            if (rdbtnCustomerInvoice.Checked)
            {
                downPaymentFromCustomerApplyFormUI.Tbl_ApplyToDocument     = txtApplyToDocumentGuid.Text;
                downPaymentFromCustomerApplyFormUI.opt_ApplyToDocumentType = applyToDocumentCustomerInvoice;
            }
            else if (RdbtnCustomerInvoiceProcess.Checked)
            {
                downPaymentFromCustomerApplyFormUI.Tbl_ApplyToDocument     = txtApplyotDocumentCIPGuid.Text;
                downPaymentFromCustomerApplyFormUI.opt_ApplyToDocumentType = applyToDocumentCustomerInvoiceProcess;
            }
            downPaymentFromCustomerApplyFormUI.DueDate                        = Convert.ToDateTime(txtDueDate.Text);
            downPaymentFromCustomerApplyFormUI.RemainingAmount                = Convert.ToDecimal(txtRemainingAmount.Text);
            downPaymentFromCustomerApplyFormUI.ApplyAmount                    = Convert.ToDecimal(txtApplyAmount.Text);
            downPaymentFromCustomerApplyFormUI.opt_Type                       = Convert.ToInt32(ddloptType.SelectedValue);
            downPaymentFromCustomerApplyFormUI.OrignalDocumentAmount          = Convert.ToDecimal(txtOrignalDocumentAmount.Text);
            downPaymentFromCustomerApplyFormUI.DiscountDate                   = Convert.ToDateTime(txtDiscountDate.Text);
            downPaymentFromCustomerApplyFormUI.Tbl_CurrencyId_ApplyToCurrency = txtCurrencyGuid.Text;


            if (downPaymentFromCustomerApplyFormBAL.AddDownPaymentFromCustomerApply(downPaymentFromCustomerApplyFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
                divSuccess.Visible = false;
                divError.Visible   = true;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Bank_Accounting_Customer_Down_Payment_Default.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Bank_Accounting_Customer_Down_Payment_Default : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
コード例 #30
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            customerGroupFormUI.CreatedBy          = SessionContext.UserGuid;
            customerGroupFormUI.Tbl_OrganizationId = SessionContext.OrganizationId;

            if (txtCustomerGroupId_SelfGuid.Text != "")
            {
                customerGroupFormUI.Tbl_CustomerGroupId_Self = txtCustomerGroupId_SelfGuid.Text;
            }
            else
            {
                customerGroupFormUI.Tbl_CustomerGroupId_Self = null;
            }

            customerGroupFormUI.Description = txtDescription.Text;
            if (chckIsDefault.Checked == true)
            {
                customerGroupFormUI.IsDefault = true;
            }
            else
            {
                customerGroupFormUI.CalendarYear = false;
            }

            customerGroupFormUI.Tbl_CurrencyId       = txtCurrencyGuid.Text;
            customerGroupFormUI.Opt_BalanceType      = Convert.ToInt32(ddlOpt_BalanceType.SelectedValue);
            customerGroupFormUI.Opt_MinimumPayment   = Convert.ToInt32(ddlOpt_MinimumPayment.SelectedValue);
            customerGroupFormUI.MinimumPaymentAmount = Convert.ToDecimal(txtMinimumPaymentAmount.Text);
            customerGroupFormUI.Opt_CreditLimit      = Convert.ToInt32(ddlOpt_CreditLimit.SelectedValue);
            customerGroupFormUI.CreditLimitAmount    = Convert.ToDecimal(txtCreditLimitAmount.Text);
            customerGroupFormUI.Opt_Writeoff         = Convert.ToInt32(ddlOpt_WriteOff.SelectedValue);
            customerGroupFormUI.WriteoffAmount       = Convert.ToDecimal(txtWriteOffAmount.Text);
            customerGroupFormUI.TradeDiscount        = Convert.ToDecimal(txtTradeDiscount.Text);
            customerGroupFormUI.Tbl_PaymentTermsId   = txtPaymentTermGuid.Text;

            if (chckCalendarYear.Checked == true)
            {
                customerGroupFormUI.CalendarYear = true;
            }
            else
            {
                customerGroupFormUI.CalendarYear = false;
            }

            if (chckFiscalYear.Checked == true)
            {
                customerGroupFormUI.FiscalYear = true;
            }
            else
            {
                customerGroupFormUI.FiscalYear = false;
            }

            if (chckTransaction.Checked == true)
            {
                customerGroupFormUI.Transaction = true;
            }
            else
            {
                customerGroupFormUI.Transaction = false;
            }

            if (chckDistribution.Checked == true)
            {
                customerGroupFormUI.Distribution = true;
            }
            else
            {
                customerGroupFormUI.Distribution = false;
            }
            customerGroupFormUI.Opt_StatementCycle = Convert.ToInt32(ddlOpt_StatementCycle.SelectedValue);


            if (customerGroupFormBAL.AddCustomerGroup(customerGroupFormUI) == 1)
            {
                divSuccess.Visible = true;
                divError.Visible   = false;
                lblSuccess.Text    = Resources.GlobalResource.msgRecordInsertedSuccessfully;
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "clearform", "ClearForm();", true);
            }
            else
            {
                divSuccess.Visible = false;
                divError.Visible   = true;
                lblError.Text      = Resources.GlobalResource.msgCouldNotInsertRecord;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "btnSave_Click()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Receivable_Customer_Master_Creation_CustomerGroupForm.CS";
            logExcpUIobj.RecordId         = "New Record";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_SupplierGroupForm : btnSave_Click] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }