Пример #1
0
        protected void btnAddAct250Info_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtLandUsePermit.Text.ToString()) == true)
            {
                LogMessage("Enter Land Use Permit");
                txtLandUsePermit.Focus();
                return;
            }

            if (btnAddAct250Info.Text == "Submit")
            {
                ConservationAct250Result objConservationAct250Result = ConservationAct250Data.AddAct250Farm(txtLandUsePermit.Text,
                                                                                                            DataUtils.GetInt(ddlTown.SelectedValue.ToString()), DataUtils.GetInt(txtDistrictNo.Text),
                                                                                                            DataUtils.GetInt(ddlFarmType.SelectedValue.ToString()), txtDevname.Text, DataUtils.GetInt(txtPrimeSoilsAcresLost.Text),
                                                                                                            DataUtils.GetInt(txtStateSoilsAcresLost.Text), DataUtils.GetInt(txtTotAcresLost.Text), DataUtils.GetInt(txtAcresDeveloped.Text),
                                                                                                            DataUtils.GetInt(ddlDeveloper.SelectedValue.ToString()), DataUtils.GetDecimal(txtAnticipatedFunds.Text),
                                                                                                            DataUtils.GetDate(txtMitigationDate.Text));

                BindGrids();
                ClearAct250InfoForm();

                if (objConservationAct250Result.IsDuplicate && !objConservationAct250Result.IsActive)
                {
                    LogMessage("Act250 Info already exist as in-active");
                }
                else if (objConservationAct250Result.IsDuplicate)
                {
                    LogMessage("Act250 Info already exist");
                }
                else
                {
                    LogMessage("Act250 Info added successfully");
                }
            }
            else
            {
                ConservationAct250Data.UpdateAct250Farm(DataUtils.GetInt(hfAct250FarmID.Value), DataUtils.GetInt(ddlTown.SelectedValue.ToString()),
                                                        DataUtils.GetInt(txtDistrictNo.Text), DataUtils.GetInt(ddlFarmType.SelectedValue.ToString()), txtDevname.Text,
                                                        DataUtils.GetInt(txtPrimeSoilsAcresLost.Text), DataUtils.GetInt(txtStateSoilsAcresLost.Text), DataUtils.GetInt(txtTotAcresLost.Text),
                                                        DataUtils.GetInt(txtAcresDeveloped.Text), DataUtils.GetInt(ddlDeveloper.SelectedValue.ToString()), DataUtils.GetDecimal(txtAnticipatedFunds.Text),
                                                        DataUtils.GetDate(txtMitigationDate.Text), chkAct250Active.Checked);

                gvAct250Info.EditIndex = -1;
                ClearAct250InfoForm();
                BindGrids();
                btnAddAct250Info.Text = "Submit";
                LogMessage("Act250 Info Updated Successfully");
            }
        }
Пример #2
0
        protected void btnAddDevPayments_Click(object sender, EventArgs e)
        {
            ConservationAct250Result objConservationAct250Result = ConservationAct250Data.AddAct250DevPay(DataUtils.GetInt(hfAct250FarmID.Value),
                                                                                                          DataUtils.GetDecimal(txtDevPaymentAmount.Text), DataUtils.GetDate(txtDevPaymentReceived.Text));

            ClearDeveloperPaymentsForm();
            BindDeveloperPaymentsGrid();

            if (objConservationAct250Result.IsDuplicate && !objConservationAct250Result.IsActive)
            {
                LogMessage("Developer Payment already exist as in-active");
            }
            else if (objConservationAct250Result.IsDuplicate)
            {
                LogMessage("Developer Payment already exist");
            }
            else
            {
                LogMessage("Developer Payment Added Successfully");
            }
        }
Пример #3
0
        protected void btnAddVHCBProject_Click(object sender, EventArgs e)
        {
            ConservationAct250Result objConservationAct250Result = ConservationAct250Data.AddAct250Projects(DataUtils.GetInt(hfAct250FarmID.Value),
                                                                                                            DataUtils.GetInt(ddlProjects.SelectedValue.ToString()), DataUtils.GetInt(ddlConservationTown.SelectedValue.ToString()),
                                                                                                            DataUtils.GetDecimal(txtAntFunds.Text), DataUtils.GetDate(txtDateClosed.Text));

            ClearVHCBProjectsForm();
            BindVHCBProjectsGrid();

            if (objConservationAct250Result.IsDuplicate && !objConservationAct250Result.IsActive)
            {
                LogMessage("Potential VHCB Project already exist as in-active");
            }
            else if (objConservationAct250Result.IsDuplicate)
            {
                LogMessage("Potential VHCB Project already exist");
            }
            else
            {
                LogMessage("Potential VHCB Project Added Successfully");
            }

            cbAddVHCBProjects.Checked = false;
        }