protected void btnIssueCertificate_Click(object sender, EventArgs e)
    {
        TextBox             txtCertificateNumber      = (TextBox)fvIssuecertificate.FindControl("txtCertificateNumber");
        TextBox             txtValuationDate          = (TextBox)fvIssuecertificate.FindControl("txtCertificateIssuedOn");
        TextBox             txtCertificateDescription = (TextBox)fvIssuecertificate.FindControl("txtCertificateDescription");
        TextBox             txtCertificateRemarks     = (TextBox)fvIssuecertificate.FindControl("txtCertificateRemarks");
        AdjudicationRequest objAdjRequest             = new AdjudicationRequest();

        Guid AdjudicationId = new Guid("6221631a-fbc0-4d1f-ae68-016b8798e8c0");

        objAdjRequest.IssueCertificate(AdjudicationId, txtCertificateNumber.Text, Convert.ToDateTime(txtValuationDate), txtCertificateDescription.Text);
        //objAdjRequest.AddNewValuationSheetDetails(
        //mvStampDutyCalculation.SetActiveView(mvStampDutyCalculation.Views[1]);

        //fvValuationResult.ChangeMode(FormViewMode.Insert);

        //ValuationResult Result = new ValuationResult();
        //Result = (ValuationResult) ViewState["Result"];
        //TextBox txtReceiveDate = (TextBox) fvValuationResult.FindControl("txtReceivedDate");
        //TextBox txtValuationDate = (TextBox) fvValuationResult.FindControl("txtValuationDate");
        //TextBox txtAreaOfPlot = (TextBox) fvValuationResult.FindControl("txtAreaOfPlot");
        //TextBox txtAreaOfConstruction = (TextBox) fvValuationResult.FindControl("txtAreaOfConstruction");
        //TextBox txtRateOfConstruction = (TextBox) fvValuationResult.FindControl("txtRateOfConstruction");
        //TextBox txtEstimatedValue = (TextBox) fvValuationResult.FindControl("txtEstimatedValue");
        //TextBox txtInternalElectrification = (TextBox) fvValuationResult.FindControl("txtInternalElectrification");
        //TextBox txtDevelopmentalExpense = (TextBox) fvValuationResult.FindControl("txtDevelopmentalExpense");
        //TextBox txtSupervisionExpense = (TextBox) fvValuationResult.FindControl("txtSupervisionExpense");
        //TextBox txtLiftExpenses = (TextBox) fvValuationResult.FindControl("txtLiftExpenses");
        //TextBox txtTotalConstructionExpense = (TextBox) fvValuationResult.FindControl("txtTotalConstructionExpense");
        //TextBox txtLifeSpanOfStructure = (TextBox) fvValuationResult.FindControl("txtLifeSpanOfStructure");
        //TextBox txtYearOfConstruction = (TextBox) fvValuationResult.FindControl("txtYearOfConstruction");
        //TextBox txtDepreciationValue = (TextBox) fvValuationResult.FindControl("txtDepreciationValue");
        //TextBox txtNettValue = (TextBox) fvValuationResult.FindControl("txtNettValue");
        //TextBox txtDeductions = (TextBox) fvValuationResult.FindControl("txtDeductions");

        //TextBox txtLandValue = (TextBox) fvValuationResult.FindControl("txtLandValue");
        //TextBox txtStampDuty = (TextBox) fvValuationResult.FindControl("txtStampDuty");
        //TextBox txtRemarks = (TextBox) fvValuationResult.FindControl("txtRemarks");

        //txtAreaOfPlot.Text = Convert.ToDecimal(Result.AreaOfLand).ToString();
        //txtAreaOfConstruction.Text = Convert.ToDecimal(Result.PlinthAreaOfConstruction).ToString();
        //txtRateOfConstruction.Text = Convert.ToDecimal(Result.ConstructionExpense).ToString();
        //txtEstimatedValue.Text = Convert.ToDecimal(Result.EstimatedPrice).ToString();
        //txtInternalElectrification.Text = Convert.ToDecimal(Result.InternalElectrificationExpense).ToString();
        //txtDevelopmentalExpense.Text = Convert.ToDecimal(Result.DevelopmentExpense).ToString();
        ////  txtSupervisionExpense.Text=Result.
        //txtLiftExpenses.Text = Convert.ToDecimal(Result.LiftExpense).ToString();
        //txtTotalConstructionExpense.Text = Convert.ToDecimal(Result.EstimatedPriceOfConstruction).ToString();
        //txtLifeSpanOfStructure.Text = Convert.ToDecimal(Result.LifeOfConstruction).ToString();
        //txtYearOfConstruction.Text = Convert.ToInt32(Result.YearOfConstruction).ToString();
        //txtDepreciationValue.Text = Convert.ToDecimal(Result.Depreciation).ToString();

        //txtDeductions.Text = Convert.ToDecimal(Result.SpecialDeduction).ToString();
        //txtNettValue.Text = Convert.ToDecimal(Result.ValuationOfProperty).ToString();
        //txtLandValue.Text = Convert.ToDecimal(Result.NetPrice).ToString();
        ////	txtStampDuty.Text = Convert.ToDecimal(Result.SToString();


        //txtRemarks.Text = Result.Remarks;
    }
 protected void FvAdjudicationRequest_ItemInserting(object sender, FormViewInsertEventArgs e)
 {
     e.Values["OfficeId"] = ViewState["OfficeId"];
     Global.SetFormViewParameters(e.Values, AdjudicationRequest.GetAdjudicationRow());
     AdjudicationRow = (AdjudicationRequestRow)e.Values[0];
     e.Cancel        = true;
 }
Beispiel #3
0
    protected void FvValuationForm_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        Global.SetFormViewParameters(e.Values, AdjudicationRequest.GetValuationFormRow());

        //string ID = "12b7a44f-61b3-48af-ab91-a6bf83a2d42a";

        e.Values.Add("Id", ValuationId);
    }
    protected void fvValuationForm_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        ViewState["OfficeId"] = e.Values["OfficeId"];
        Global.SetFormViewParameters(e.Values, AdjudicationRequest.GetValuationFormRow());
        DataTable dtDocDetails = (DataTable)ViewState["DocDetails"];

        e.Values.Add("DocDetails", dtDocDetails);
    }
    protected void UpdateDocDetails_Click(object sender, EventArgs e)
    {
        string Mode            = "Ins";
        Guid   ValuationFormId = Guid.Empty;

        if (null == ViewState["DocDetails"])
        {
            ViewState["DocDetails"] = new AdjudicationRequest().GetDocumentByValuationFormId(Guid.Empty);
            ValuationFormId         = Guid.Empty;
        }
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            //TODO: Replace the Data Key Name here.
            ValuationFormId = (Guid)fvValuationForm.DataKey["ValuationFormId"];
            Mode            = "Upd";
        }

        GridView     gvDocDetails  = ((GridView)fvValuationForm.FindControl("gvDocument" + Mode));
        DataTable    dtDocDetails  = (DataTable)ViewState["DocDetails"];
        DropDownList ddlDoc        = ((DropDownList)fvValuationForm.FindControl("ddlDocumentType" + Mode));
        TextBox      txtDocNumber  = ((TextBox)fvValuationForm.FindControl("txtDocumentNumber" + Mode));
        TextBox      txtDocRemarks = ((TextBox)fvValuationForm.FindControl("txtDocRemarks" + Mode));
        CheckBox     chkSubmitted  = ((CheckBox)fvValuationForm.FindControl("chkSubmitted" + Mode));

        object[] keys = { ValuationFormId, new Guid(ddlDoc.SelectedValue) };
        DataRow  dr   = dtDocDetails.Rows.Find(keys);

        if (null == dr)
        {
            keys[1] = gvDocDetails.SelectedDataKey["DocumentTypeId"];
            dr      = dtDocDetails.Rows.Find(keys);
        }

        if (null != dr)
        {
            dr["DocumentTypeId"] = new Guid(ddlDoc.SelectedValue);
            dr["DocName"]        = ddlDoc.SelectedItem.Text;
            dr["DocumentNumber"] = txtDocNumber.Text;
            dr["Remarks"]        = txtDocRemarks.Text;
            dr["Submitted"]      = chkSubmitted.Checked;
        }

        ((Button)fvValuationForm.FindControl("btnAddDocument" + Mode)).Visible      = true;
        ((Button)fvValuationForm.FindControl("btnUpdateFeeDetails" + Mode)).Visible = false;

        gvDocDetails.DataSource = (DataTable)ViewState["DocDetails"];
        gvDocDetails.DataBind();
        gvDocDetails.SelectedIndex = -1;
        txtDocNumber.Text          = "";
        txtDocRemarks.Text         = "";
        chkSubmitted.Checked       = false;
        ddlDoc.DataBind();
    }
    protected void fvValuationForm_DataBound(object sender, EventArgs e)
    {
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            Guid ValuationId = new Guid(fldValId.Value);

            ViewState["DocDetails"] = new AdjudicationRequest().GetDocumentByValuationFormId(ValuationId);
            GridView GvDocDetails = ((GridView)fvValuationForm.FindControl("gvDocumentUpd"));
            GvDocDetails.DataSource = ViewState["DocDetails"];
            GvDocDetails.DataBind();
        }
    }
    protected void btnIssueCertificate_Click1(object sender, EventArgs e)
    {
        GridView GvAdjudicationRequest = ((GridView)mvStampDutyCalculation.FindControl("GvAdjudicationRequest"));
        Guid     AdjudicationId        = (Guid)GvAdjudicationRequest.SelectedDataKey.Value;

        TextBox txtCertificateNumber = (TextBox)fvIssuecertificate.FindControl("txtCertificateNumber");

        TextBox txtCertificateIssuedOn = (TextBox)fvIssuecertificate.FindControl("txtCertificateIssuedOn");

        TextBox             txtCertificateRemarks  = (TextBox)fvIssuecertificate.FindControl("txtCertificateRemarks");
        AdjudicationRequest objAdjudicationRequest = new AdjudicationRequest();

        objAdjudicationRequest.IssueCertificate(AdjudicationId, txtCertificateNumber.Text, Convert.ToDateTime(txtCertificateIssuedOn.Text), txtCertificateRemarks.Text);
    }
    protected void fvValuationForm_ItemUpdating(object sender, FormViewUpdateEventArgs e)
    {
        Global.SetFormViewParameters(e.NewValues, AdjudicationRequest.GetValuationFormRow());

        DataTable dtFeeDetails = (DataTable)ViewState["FeeDetails"];
        DataTable dtDocDetails = (DataTable)ViewState["DocDetails"];

        e.NewValues.Add("FeeDetails", dtFeeDetails);
        e.NewValues.Add("DocDetails", dtDocDetails);
        e.NewValues.Add("ValuationId", fldValId.Value);
        e.NewValues.Add("AdjudicationId", fldAdjId.Value);

        FvAdjudicationRequest.UpdateItem(true);

        e.NewValues.Add("AdjReqRow", AdjudicationRow);
    }
    protected void UpdateFeeDetails_Click(object sender, EventArgs e)
    {
        string Mode           = "Ins";
        Guid   AdjudicationID = Guid.Empty;

        if (null == ViewState["FeeDetails"])
        {
            ViewState["FeeDetails"] = new AdjudicationRequest().GetAdjFeesDetailByAdjId(Guid.Empty);
            AdjudicationID          = Guid.Empty;
        }
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            //TODO: Replace the Data Key Name here.
            AdjudicationID = (Guid)fvValuationForm.DataKey["AdjudicationId"];
            Mode           = "Upd";
        }


        GridView     gvFeesDetails = ((GridView)fvValuationForm.FindControl("gvFeeStampDetails" + Mode));
        DataTable    dtFeesDetails = (DataTable)ViewState["FeeDetails"];
        DropDownList ddlFees       = ((DropDownList)fvValuationForm.FindControl("ddlFeeType" + Mode));
        TextBox      txtAmount     = ((TextBox)fvValuationForm.FindControl("txtFeeAmount" + Mode));

        object[] keys = { AdjudicationID,
                          new Guid(ddlFees.SelectedValue) };
        DataRow  dr = dtFeesDetails.Rows.Find(keys);

        if (null == dr)
        {
            keys[1] = gvFeesDetails.SelectedDataKey["FeeId"];
            dr      = dtFeesDetails.Rows.Find(keys);
        }

        if (null != dr)
        {
            dr["FeeId"]  = new Guid(ddlFees.SelectedItem.Value);
            dr["Amount"] = txtAmount.Text;
        }

        ((Button)fvValuationForm.FindControl("btnAddFeeDetail" + Mode)).Visible    = true;
        ((Button)fvValuationForm.FindControl("btnUpdateFeeDetail" + Mode)).Visible = false;

        gvFeesDetails.DataSource = (DataTable)ViewState["FeeDetails"];
        gvFeesDetails.DataBind();
        gvFeesDetails.SelectedIndex = -1;
        ddlFees.DataBind();
    }
Beispiel #10
0
    protected void DocDetailsGrid_SelectedIndexChanged(object sender, EventArgs e)
    {
        string Mode            = "Ins";
        Guid   ValuationFormId = Guid.Empty;

        if (null == ViewState["DocDetails"])
        {
            ViewState["DocDetails"] = new AdjudicationRequest().GetDocumentByValuationFormId(Guid.Empty);
            ValuationFormId         = Guid.Empty;
        }
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            //TODO: Replace the Data Key Name here.
            ValuationFormId = (Guid)fvValuationForm.DataKey["ValuationFormId"];
            Mode            = "Upd";
        }

        GridView     gv            = (GridView)sender;
        DataTable    dt            = (DataTable)ViewState["DocDetails"];
        GridView     gvDocDetails  = ((GridView)fvValuationForm.FindControl("gvDocumentIns" + Mode));
        DropDownList ddlDoc        = ((DropDownList)fvValuationForm.FindControl("ddlDocumentType" + Mode));
        TextBox      txtDocNumber  = ((TextBox)fvValuationForm.FindControl("txtDocumentNumber" + Mode));
        TextBox      txtDocRemarks = ((TextBox)fvValuationForm.FindControl("txtDocRemarks" + Mode));
        CheckBox     chkSubmitted  = ((CheckBox)fvValuationForm.FindControl("chkSubmitted" + Mode));

        object[] keys = new object[gv.SelectedDataKey.Values.Count];
        for (int i = 0; i < keys.Length; i++)
        {
            keys[i] = gv.SelectedDataKey.Values[i];
        }
        DataRow dr = dt.Rows.Find(keys);

        if (null != dr)
        {
            ddlDoc.SelectedValue = Convert.ToString(dr["DocumentTypeId"]);
            txtDocNumber.Text    = (string)dr["DocumentNumber"];
            txtDocRemarks.Text   = (string)dr["Remarks"];
            chkSubmitted.Checked = (bool)dr["Submitted"];
        }

        ((Button)fvValuationForm.FindControl("btnAddDocument" + Mode)).Visible      = false;
        ((Button)fvValuationForm.FindControl("btnUpdateFeeDetails" + Mode)).Visible = true;
    }
    protected void fvStampDutyCalculation_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
    {
        CheckBox ChkPhysicalVerification = (CheckBox)fvStampDutyCalculation.FindControl("chkPhysicalVerification");
        bool     PvRequired = ChkPhysicalVerification.Checked;

        if (!PvRequired)
        {
            mvStampDutyCalculation.SetActiveView(mvStampDutyCalculation.Views[2]);
            fldAdjudicationId.Value = fvStampDutyCalculation.SelectedValue.ToString();
            fvIssuecertificate.DataBind();

            //FormView1.DataBind();
        }
        else
        {
            GridView GvAdjudicationRequest = ((GridView)mvStampDutyCalculation.FindControl("GvAdjudicationRequest"));
            Guid     AdjudicationId        = (Guid)GvAdjudicationRequest.SelectedDataKey.Value;
            mvStampDutyCalculation.SetActiveView(mvStampDutyCalculation.Views[0]);
            AdjudicationRequest objAdjudicationRequest = new AdjudicationRequest();
            objAdjudicationRequest.UpdatePhysicalVerification(AdjudicationId);
        }
    }
Beispiel #12
0
    protected void FeeDetailsGrid_SelectedIndexChanged(object sender, EventArgs e)
    {
        string Mode           = "Ins";
        Guid   AdjudicationID = Guid.Empty;

        if (null == ViewState["FeeDetails"])
        {
            ViewState["FeeDetails"] = new AdjudicationRequest().GetAdjFeesDetailByAdjId(Guid.Empty);
            AdjudicationID          = Guid.Empty;
        }
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            AdjudicationID = (Guid)fvValuationForm.DataKey["AdjudicationId"];
            Mode           = "Upd";
        }

        GridView  gv = (GridView)sender;
        DataTable dt = (DataTable)ViewState["FeeDetails"];

        DropDownList ddlFees   = ((DropDownList)fvValuationForm.FindControl("ddlFeeType" + Mode));
        TextBox      txtAmount = ((TextBox)fvValuationForm.FindControl("txtFeeAmount" + Mode));

        object[] keys = new object[gv.SelectedDataKey.Values.Count];
        for (int i = 0; i < keys.Length; i++)
        {
            keys[i] = gv.SelectedDataKey.Values[i];
        }
        DataRow dr = dt.Rows.Find(keys);

        if (null != dr)
        {
            ddlFees.SelectedValue = Convert.ToString(dr["FeeId"]);
            txtAmount.Text        = Convert.ToString(dr["Amount"]);
        }

        ((Button)fvValuationForm.FindControl("btnAddFeeDetail" + Mode)).Visible    = false;
        ((Button)fvValuationForm.FindControl("btnUpdateFeeDetail" + Mode)).Visible = true;
    }
Beispiel #13
0
    protected void DocDetails_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        Guid ValuationFormId = Guid.Empty;

        if (null == ViewState["DocDetails"])
        {
            ViewState["DocDetails"] = new AdjudicationRequest().GetDocumentByValuationFormId(Guid.Empty);
            ValuationFormId         = Guid.Empty;
        }
        if (fvValuationForm.CurrentMode == FormViewMode.Edit)
        {
            ValuationFormId = (Guid)fvValuationForm.DataKey["ValuationFormId"];
        }
        GridView  gv = (GridView)sender;
        DataTable dt = (DataTable)ViewState["DocDetails"];
        int       i  = e.RowIndex;

        dt.Rows[i].Delete();
        dt.AcceptChanges();
        ViewState["DocDetails"] = dt;
        gv.DataSource           = ViewState["DocDetails"];
        gv.DataBind();
    }
Beispiel #14
0
 protected void FvFeeMaster_ItemInserting(object sender, FormViewInsertEventArgs e)
 {
     Global.SetFormViewParameters(e.Values, AdjudicationRequest.GetFeeMasterRow());
 }
Beispiel #15
0
 protected void FvAdjudicationRequest_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     Global.SetFormViewParameters(e.NewValues, AdjudicationRequest.GetAdjudicationRow());
     AdjudicationRow = (AdjudicationRequestRow)e.NewValues[0];
     e.Cancel        = true;
 }
 protected void FvValuationForm_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     Global.SetFormViewParameters(e.NewValues, AdjudicationRequest.GetValuationFormRow());
 }