Exemplo n.º 1
0
    private void fvItemInserting(FormView fv)
    {
        TextBox               tbFarmName       = fv.FindControl("tbFarmName") as TextBox;
        DropDownList          ddlProgramWAC    = fv.FindControl("ddlProgramWAC") as DropDownList;
        DropDownList          ddlFarmSize      = fv.FindControl("ddlFarmSize") as DropDownList;
        DropDownList          ddlBasin         = fv.FindControl("ddlBasin") as DropDownList;
        DropDownList          ddlSoldFarm      = fv.FindControl("ddlSoldFarm") as DropDownList;
        CheckBox              cbGenerateFarmID = fv.FindControl("cbGenerateFarmID") as CheckBox;
        WACPR_TaxParcelPicker taxParcelPicker  = fv.FindControl("WACPR_TaxParcelPicker") as WACPR_TaxParcelPicker;

        sReq.ParmList.Clear();
        List <WACParameter> taxParcelProps = taxParcelPicker.GetContents();

        sReq.ParmList.Add(WACParameter.GetParameter(taxParcelProps, "swis"));
        sReq.ParmList.Add(WACParameter.GetParameter(taxParcelProps, "printKey"));
        WACUserInputUtilityControl wcc = (WACUserInputUtilityControl)fv.FindControl("WACPT_ParticipantAlphaPicker");
        WACParameter wp = WACParameter.GetParameter(wcc.GetContents(), "pk_participant");

        wp.ParmName = "fk_participantOperator";
        wcc         = (WACUserInputUtilityControl)fv.FindControl("WACPT_ParticipantAlphaPicker_Owner");
        wp          = WACParameter.GetParameter(wcc.GetContents(), "pk_participant");
        wp.ParmName = "fk_participantOwner";
        sReq.ParmList.Add(wp);
        sReq.ParmList.Add(new WACParameter("farm_name", tbFarmName.Text, WACParameter.ParameterType.Property));
        sReq.ParmList.Add(new WACParameter("fk_programWAC_code", ddlProgramWAC.SelectedValue, WACParameter.ParameterType.Property));
        sReq.ParmList.Add(new WACParameter("fk_farmSize_code", ddlFarmSize.SelectedValue, WACParameter.ParameterType.Property));
        sReq.ParmList.Add(new WACParameter("fk_basin_code", ddlBasin.SelectedValue, WACParameter.ParameterType.Property));
        sReq.ParmList.Add(new WACParameter("sold_farm", ddlSoldFarm.SelectedValue, WACParameter.ParameterType.Property));
        sReq.ParmList.Add(new WACParameter("GenerateID", cbGenerateFarmID.Checked ? "Y" : "N", WACParameter.ParameterType.Property));
        sReq.ServiceRequested = ServiceFactory.ServiceTypes.InsertItem;
        sReq.ServiceFor       = fv;
        ServiceFactory.Instance.ServiceRequest(sReq);
        taxParcelProps = null;
    }
Exemplo n.º 2
0
    private void fvItemInserting(FormView fv)
    {
        TextBox tbNote = fv.FindControl("tbNote") as TextBox;
        WACUserInputUtilityControl wcc = (WACUserInputUtilityControl)fv.FindControl("WACUT_YesNoChooser");

        sReq.ParmList = wcc.GetContents();
        wcc           = (WACUserInputUtilityControl)fv.FindControl("WACPT_ParticipantAlphaPicker");
        WACParameter wp = WACParameter.GetParameter(wcc.GetContents(), "pk_participant");

        wp.ParmName = "fk_participant";
        sReq.ParmList.Add(wp);
        sReq.ParmList.Add(new WACParameter("note", tbNote.Text, WACParameter.ParameterType.Property));
        sReq.ServiceFor       = fv;
        sReq.ServiceRequested = ServiceFactory.ServiceTypes.InsertItem;
        ServiceFactory.Instance.ServiceRequest(sReq);
    }
Exemplo n.º 3
0
 private void fvItemInserting(FormView fv)
 {
     try
     {
         CustomControls_AjaxCalendar agreementDate   = (CustomControls_AjaxCalendar)fv.FindControl("tbCalAgreementDate");
         WACPR_TaxParcelPicker       taxParcelPicker = fv.FindControl("WACPR_TaxParcelPicker") as WACPR_TaxParcelPicker;
         sReq.ParmList.Clear();
         List <WACParameter> taxParcelProps = taxParcelPicker.GetContents();
         sReq.ParmList.Add(WACParameter.GetParameter(taxParcelProps, "swis"));
         sReq.ParmList.Add(WACParameter.GetParameter(taxParcelProps, "printKey"));
         sReq.ParmList.Add(new WACParameter("agreement_date", agreementDate.CalDateNotNullable, WACParameter.ParameterType.Property));
         sReq.ServiceRequested = ServiceFactory.ServiceTypes.InsertItem;
         sReq.ServiceFor       = fv;
         ServiceFactory.Instance.ServiceRequest(sReq);
         taxParcelProps = null;
     }
     catch (Exception ex)
     {
         WACAlert.Show(ex.Message, 0);
     }
 }