Beispiel #1
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());

            try
            {
                string     hMode = Dispatch.EitherField("HiddenMode");
                string     sede_ServiceDealid   = Dispatch.EitherField("sede_ServiceDealid");
                int        errorflag            = 0;
                string     errormessage         = string.Empty;
                Record     ServiceDeal          = FindRecord("ServiceDeal", "sede_ServiceDealid=" + sede_ServiceDealid);
                string     sede_serviceacceptid = ServiceDeal.GetFieldAsString("sede_serviceacceptid");
                EntryGroup ServiceDealNewEntry  = new EntryGroup("ServiceDealNewEntry");
                ServiceDealNewEntry.Fill(ServiceDeal);
                Entry IntentionOrderidEntry = ServiceDealNewEntry.GetEntry("sede_serviceacceptid");

                IntentionOrderidEntry.ReadOnly = true;

                //AddTabHead("Person");
                //GetTabs("Person", "Person Summary");
                AddTabHead("ServiceDeal");
                if (hMode == "Save")
                {
                    ////double original =Person.GetFieldAsDouble("");
                    ServiceDealNewEntry.Fill(ServiceDeal);
                    ////double  =Person.GetFieldAsDouble("");

                    if (ServiceDealNewEntry.Validate())
                    {
                        ServiceDeal.SaveChanges();

                        ////Record BusReport= FindRecord("BusReport", "cpet_competitorid=" + cpet_competitorid);
                        ////double  = BusReport.GetFieldAsDouble("");
                        //// =  + - original;
                        ////BusReport.SetField("", );
                        ////BusReport.SaveChanges();

                        string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&seac_ServiceAcceptId=" + sede_serviceacceptid + "&J=Summary";
                        url = url.Replace("Key37", "ServiceDealid");
                        url = url + "&Key37=" + sede_serviceacceptid;
                        Dispatch.Redirect(url);
                        errorflag = -1;
                    }
                    else
                    {
                        errorflag = 1;
                    }
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    ServiceDealNewEntry.GetHtmlInEditMode(ServiceDeal);
                    vpMainPanel.Add(ServiceDealNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("Save", "Save.gif", sUrl);
                    string urldelete = base.UrlDotNet(base.ThisDotNetDll, "RunServiceDealDelete") + "&sede_ServiceDealid=" + sede_ServiceDealid;
                    base.AddUrlButton("Delete", "Delete.gif", urldelete);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&seac_ServiceAcceptId=" + sede_serviceacceptid + "&J=Summary";
                    url = url.Replace("Key37", "ServiceDealid");
                    url = url + "&Key37=" + sede_serviceacceptid;
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            }
            catch (Exception e)
            {
                AddError(e.Message);
            }
        }
Beispiel #2
0
        public override void BuildContents()
        {
            try
            {
                AddContent(HTML.Form());
                string qutaid = Dispatch.EitherField("quta_Quotationid");
                if (string.IsNullOrEmpty(qutaid))
                {
                    qutaid = Dispatch.EitherField("key37");
                }
                Record QutaRec  = FindRecord("Quotation", "quta_Quotationid=" + qutaid);
                string exchange = QutaRec.GetFieldAsString("quta_exchange");
                if (string.IsNullOrEmpty(exchange) || exchange == "0")
                {
                    exchange = "1";
                }
                AddContent(HTML.InputHidden("exchange", exchange));
                string currency = QutaRec.GetFieldAsString("quta_currencysid");
                if (!string.IsNullOrEmpty(currency))
                {
                    Record currRec  = FindRecord("Currencys", "curr_CurrencysId=" + currency);
                    string currname = currRec.GetFieldAsString("curr_des");
                    AddContent(HTML.InputHidden("currency", currname));
                }

                string     qdid    = Dispatch.EitherField("qtdt_QuotationDetailID");
                string     hMode   = Dispatch.EitherField("HiddenMode");
                EntryGroup QDEntry = new EntryGroup("QuotationDetailNewEntry");
                QDEntry.Title = "报价明细";
                Record QDRec   = FindRecord("QuotationDetail", "qtdt_QuotationDetailID=" + qdid);
                int    errflag = 0;
                AddTabHead("QuotationDetail");
                //GetTabs("QuotationDetail", "QuotationDetail Summary");
                if (hMode == "Save")
                {
                    QDEntry.Fill(QDRec);
                    if (QDEntry.Validate() == true)
                    {
                        QDRec.SetField("quta_Quotationid", qutaid);
                        QDRec.SaveChanges();
                        QuerySelect qs = this.GetQuery();
                        qs.SQLCommand = @"Update Quotation set quta_localeamount = (select sum(qtdt_localeamount) from QuotationDetail where qtdt_deleted is null and qtdt_qutaid= " + qutaid + @")
                        ,quta_foreignamount =  (select sum(qtdt_foreignamount) from QuotationDetail where qtdt_deleted is null and qtdt_qutaid= " + qutaid + @")    where quta_Quotationid=" + qutaid;
                        qs.ExecuteNonQuery();
                        Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunDataPage") + "&quta_Quotationid=" + qutaid);
                    }
                }
                if (errflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    QDEntry.GetHtmlInEditMode(QDRec);
                    VerticalPanel vp = new VerticalPanel();
                    vp.AddAttribute("width", "100%");
                    vp.Add(QDEntry);
                    AddContent(vp);

                    string url = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    AddSubmitButton("Save", "Save.gif", url);
                    AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunQDDelete") + "&quta_Quotationid=" + qutaid + "&qtdt_QuotationDetailID=" + qdid);

                    AddUrlButton("Cancel", "cancel.gif", UrlDotNet(ThisDotNetDll, "RunDataPage") + "&quta_Quotationid=" + qutaid);
                }
            }
            catch (Exception ex)
            {
                AddError(ex.Message + "USAddPage");
            }
        }
Beispiel #3
0
        public override void BuildContents()
        {
            try {
                string mopl_MonthPlanId = Dispatch.EitherField("mopl_monthplanid");
                if (string.IsNullOrEmpty(mopl_MonthPlanId))
                {
                    mopl_MonthPlanId = Dispatch.EitherField("Key58");
                }

                Record MonthPlan = FindRecord("MonthPlan", "mopl_MonthPlanId=" + mopl_MonthPlanId);

                EntryGroup screenMonthPlan = new EntryGroup("MonthPlanNewEntry");
                screenMonthPlan.Title = "MonthPlan";
                screenMonthPlan.Fill(MonthPlan);

                string status = MonthPlan.GetFieldAsString("mopl_status");


                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenMonthPlan);

                List NewIndustyPlan = new List("NewIndustyPlanGrid");
                NewIndustyPlan.Filter                = " nipl_deleted is null and nipl_monthplanid=" + mopl_MonthPlanId;
                NewIndustyPlan.RowsPerScreen         = 500;
                NewIndustyPlan.ShowNavigationButtons = true;
                NewIndustyPlan.PadBottom             = false;
                vpMainPanel.Add(NewIndustyPlan);

                List PlanDetailGrid = new List("PlanDetailGrid");
                PlanDetailGrid.Filter                = "plde_deleted is null and plde_monthplanid=" + mopl_MonthPlanId;
                PlanDetailGrid.RowsPerScreen         = 500;
                PlanDetailGrid.ShowNavigationButtons = true;
                PlanDetailGrid.PadBottom             = false;
                vpMainPanel.Add(PlanDetailGrid);

                List VisitComponyGrid = new List("VisitComponyGrid");
                VisitComponyGrid.Filter                = "vico_deleted is null and vico_monthplanid=" + mopl_MonthPlanId;
                VisitComponyGrid.RowsPerScreen         = 500;
                VisitComponyGrid.ShowNavigationButtons = true;
                VisitComponyGrid.PadBottom             = false;
                vpMainPanel.Add(VisitComponyGrid);

                List SalePlanDetailGrid = new List("SalePlanDetailGrid");
                SalePlanDetailGrid.Filter                = "spde_deleted is null and spde_monthplanid=" + mopl_MonthPlanId;
                SalePlanDetailGrid.RowsPerScreen         = 500;
                SalePlanDetailGrid.ShowNavigationButtons = true;
                SalePlanDetailGrid.PadBottom             = false;
                vpMainPanel.Add(SalePlanDetailGrid);


                List DealerDetailGrid = new List("DealerDetailGrid");
                DealerDetailGrid.Filter                = "ddet_deleted is null and ddet_monthplanid=" + mopl_MonthPlanId;
                DealerDetailGrid.RowsPerScreen         = 500;
                DealerDetailGrid.ShowNavigationButtons = true;
                DealerDetailGrid.PadBottom             = false;
                vpMainPanel.Add(DealerDetailGrid);

                List ProcessMethodGrid = new List("ProcessMethodGrid");
                ProcessMethodGrid.Filter                = "pmet_deleted is null and pmet_monthplanid=" + mopl_MonthPlanId;
                ProcessMethodGrid.RowsPerScreen         = 500;
                ProcessMethodGrid.ShowNavigationButtons = true;
                ProcessMethodGrid.PadBottom             = false;
                vpMainPanel.Add(ProcessMethodGrid);


                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Add PlanDetail", "new.gif", UrlDotNet(ThisDotNetDll, "RunPlanDetailAdd") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Add VisitCompony", "new.gif", UrlDotNet(ThisDotNetDll, "RunVisitComponyAdd") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Add SalePlanDetail", "new.gif", UrlDotNet(ThisDotNetDll, "RunSalePlanDetailAdd") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Add DealerDetail", "new.gif", UrlDotNet(ThisDotNetDll, "RunDealerDetailAdd") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Add ProcessMethod", "new.gif", UrlDotNet(ThisDotNetDll, "RunProcessMethodAdd") + "&mopl_MonthPlanId=" + mopl_MonthPlanId);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage"));
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Beispiel #4
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());

            try
            {
                string     hMode             = Dispatch.EitherField("HiddenMode");
                string     mapl_MarActPlanId = Dispatch.EitherField("mapl_MarActPlanId");
                int        errorflag         = 0;
                string     errormessage      = string.Empty;
                EntryGroup MarActPlanPerson  = new EntryGroup("MarActPlanPerson");
                MarActPlanPerson.Title = "联系人";
                Entry bred_busreportidEntry = MarActPlanPerson.GetEntry("dper_maractplanid");
                if (bred_busreportidEntry != null)
                {
                    bred_busreportidEntry.DefaultValue = mapl_MarActPlanId;
                    bred_busreportidEntry.ReadOnly     = true;
                }

                AddTabHead("DecoratePerson");
                if (hMode == "Save")
                {
                    Record DecoratePerson = new Record("DecoratePerson");
                    MarActPlanPerson.Fill(DecoratePerson);
                    if (MarActPlanPerson.Validate())
                    {
                        DecoratePerson.SaveChanges();
                        string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&mapl_MarActPlanId=" + mapl_MarActPlanId + "&J=Summary";
                        url = url.Replace("Key37", "DecorateCompid");
                        url = url + "&Key37=" + mapl_MarActPlanId;
                        Dispatch.Redirect(url);
                        errorflag = -1;
                    }
                    else
                    {
                        errorflag = 1;
                    }
                }
                if (errorflag != -1)
                {
                    if (errorflag == 2)
                    {
                        AddError(errormessage);
                    }

                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    MarActPlanPerson.GetHtmlInEditMode();
                    vpMainPanel.Add(MarActPlanPerson);
                    AddContent(vpMainPanel);
                    AddSubmitButton("Save", "Save.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&mapl_MarActPlanId=" + mapl_MarActPlanId + "&J=Summary";
                    url = url.Replace("Key37", "DecoratePersonid");
                    url = url + "&Key37=" + mapl_MarActPlanId;
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            }
            catch (Exception e)
            {
                AddError(e.Message);
            }
        }
Beispiel #5
0
        public override void BuildContents()
        {
            try
            {
                string cpet_competitorid = Dispatch.EitherField("cpet_competitorid");
                if (string.IsNullOrEmpty(cpet_competitorid))
                {
                    cpet_competitorid = Dispatch.EitherField("key58");
                }

                Record Competitor = FindRecord("Competitor", "cpet_competitorid=" + cpet_competitorid);

                EntryGroup screenBusReport = new EntryGroup("CompetitorNewEntry");
                screenBusReport.Title = "Competitor";
                screenBusReport.Fill(Competitor);

                // string status = Competitor.GetFieldAsString("cept_status");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenBusReport);

                List CpetProductGrid = new List("CpetProductGrid");
                CpetProductGrid.Filter                = "cppr_deleted is null and cppr_competitorid=" + cpet_competitorid;
                CpetProductGrid.RowsPerScreen         = 500;
                CpetProductGrid.ShowNavigationButtons = true;
                CpetProductGrid.PadBottom             = false;
                vpMainPanel.Add(CpetProductGrid);

                List MarketActivityGrid = new List("MarketActivityGrid");
                MarketActivityGrid.Filter                = "mact_deleted is null and mact_competitorid=" + cpet_competitorid;
                MarketActivityGrid.RowsPerScreen         = 500;
                MarketActivityGrid.ShowNavigationButtons = true;
                MarketActivityGrid.PadBottom             = false;
                vpMainPanel.Add(MarketActivityGrid);

                List CompetitionPersonList = new List("CompetitionPersonList");
                CompetitionPersonList.Filter                = "dper_deleted is null and dper_competitorid=" + cpet_competitorid;
                CompetitionPersonList.RowsPerScreen         = 500;
                CompetitionPersonList.ShowNavigationButtons = true;
                CompetitionPersonList.PadBottom             = false;
                vpMainPanel.Add(CompetitionPersonList);

                AddContent(vpMainPanel);
                int userid = CurrentUser.UserId;
                //if (userid == 137 || userid == 43 || userid == 130 || CurrentUser.IsAdmin())
                //{
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&cpet_competitorid=" + cpet_competitorid);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&cpet_competitorid=" + cpet_competitorid);
                // }
                AddUrlButton("Add CpetProduct", "new.gif", UrlDotNet(ThisDotNetDll, "RunCpetProductAdd") + "&cpet_competitorid=" + cpet_competitorid);
                AddUrlButton("Add MarketActivity", "new.gif", UrlDotNet(ThisDotNetDll, "RunMarketActivityAdd") + "&cpet_competitorid=" + cpet_competitorid);
                AddUrlButton("Add Person", "new.gif", UrlDotNet(ThisDotNetDll, "RunPersonAdd") + "&cpet_competitorid=" + cpet_competitorid);

                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage"));
                //AddWorkflowButtons("Competitor");
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }