Example #1
0
 public frmCustomerEdit()
 {
     InitializeComponent();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdContact, new string[] { "customerid", "contactname", "sex", "title",
         "telphone", "mobileno", "faxno", "email", "isdefault", "remark","lastmodifiedtime","lastmodifieduser" });
 }
 public frmSupplementAdjustList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "supldtlsysid", "supplementno", "customername", "custorderno", "step", "workgroup", "styleno", "color", "size","checktype", "pairqty", "isreinspect", "supplementdate", "supplementuser" });
 }
Example #3
0
        public frmRepair()
        {
            InitializeComponent();

            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdDetail, new string[] { "categoryindex", "reasoncode", "reasoncategorydesc", "ck", "reasoncodedesc", "pairqty", "remark" });
        }
Example #4
0
 public frmRepairAdjustList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "repsysid", "customerid", "customername", "custorderno", "step", "workgroup", "reptype", "styleno", "color", "size", "checktype", "qty", "reasoncode", "isfirst", "claimuser", "claimtime" });
 }
Example #5
0
        public frmSupplement()
        {
            InitializeComponent();

            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdDetail, new string[] { "custorderno", "styleno", "color", "size", "checktype", "pairqty", "isreinspect" });
        }
Example #6
0
 public frmShipList()
 {
     InitializeComponent();
      QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "shippingsysid", "shippingno", "packingboxno", "containerno", "blno", "loadingtypetext", "actcartonqty", "emptycartonqty", "shippingstatus", "shippeddate" });
 }
Example #7
0
 public Entry(BaseForm reciever)
 {
     InitializeComponent();
     addCommand(@"Go To Recall", new commands.CommandGoToScreen(reciever, Constants.Screen.Recall));
     addCommand(@"Next Entity", new commands.NextEntity(reciever));
     currentString = Session.Instance.EntityStrings[Session.Instance.CurrentEntity];
 }
Example #8
0
 public frmLineCancel()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "customerid", "customer", "poid", "cartonno",  "status" });
 }
Example #9
0
 public frmToRepairList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "customername", "custorderno", "step", "workgroup", "styleno", "color", "size", "checktype", "curpairqty" });
 }
Example #10
0
 public frmToRepair()
 {
     InitializeComponent();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdDetail, new string[] {"categoryindex", "reasoncode", "reasoncategorydesc", "ck", "reasoncodedesc", "pairqty", "remark" });
     baseForm.CreateUltraComboColumns(this.ucmbCustOrderNo, new string[] { "customerid", "custorderno", "styleno", "color", "size", "checktype", "leftqty" });
 }
Example #11
0
 public frmOtherPricingList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "oprisysid", "customername", "itemname", "currency", "unit", "price", "effectivedate", "expireddate", "lastmodifieduser", "lastmodifiedtime" });
 }
Example #12
0
 public frmReturnList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "retsysid", "returnno","returntype", "customername", "custorderno", "styleno", "color", "size","checktype", "pairqty", "returndate", "returnuser" });
 }
Example #13
0
 public frmShipPlanList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "shippingsysid", "shippingplanno", "custorderno", "customername", "ttlcantonqty", "loadingdate", "createdtime", "createduser" });
 }
Example #14
0
 public frmEmployeeList()
 {
     InitializeComponent();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.gridEmployeeList, new string[] { "employeeid", "employeename", "employeetypeid", "department",
         "email", "telno", "mobileno", "employeestatus", "defaultshift","grade","workgroup","probationdate","effectdate","lastmodifieduser", "lastmodifiedtime" });
 }
Example #15
0
        public frmReasonCategoryList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "reasoncategory", "reasoncategorydesc", "attrtplatid", "lastmodifieduser", "lastmodifiedtime" });
        }
Example #16
0
        public frmWorkGroupList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "workgroup", "workgroupdesc", "step","lastmodifieduser", "lastmodifiedtime" });
        }
        public frmAttributeTemplateList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "attrtplatid", "attrtplatname", "usedby", "isdefault", "lastmodifieduser", "lastmodifiedtime" });
        }
Example #18
0
        public frmStaticValueList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "svid", "svtype", "svtext", "svresourceid", "svvalue", "svstatus", "lastmodifiedtime", "lastmodifieduser" });
        }
Example #19
0
 public frmXUnpacking()
 {
     InitializeComponent();
     //IsMDI = MES_Misc.N.ToString();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] {"customerid", "ck", "customername", "custorderno", "cartonno" ,"pairqty","workgroup"});
 }
Example #20
0
        public frmShip()
        {
            InitializeComponent();

            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdPlan, new string[] { "customerid", "custorderno", "customername", "factory", "ttlcantonqty" });
            baseForm.CreateUltraGridColumns(this.grdCarton, new string[] {"customerid","ck", "custorderno", "cartonno", "pairqty" });
        }
Example #21
0
        public frmWorkOrderList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "workordersysid","workorderno", "customername", "factory", "workorderstatus","createduser","createdtime", "lastmodifieduser", "lastmodifiedtime" });
        }
Example #22
0
        public frmReceivingList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "recsysid", "recno","customerid","factory","deliverydate", "weather", "receivedate", "receiver", "remark", "lastmodifiedtime", "lastmodifieduser" });
        }
Example #23
0
        public frmExchangeList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "exsysid", "fromcurrency", "tocurrency", "startdate", "expirydate", "rate", "lastmodifieduser", "lastmodifiedtime" });
        }
Example #24
0
 public Memorize(BaseForm reciever)
 {
     InitializeComponent();
     addCommand(@"Go To Practice", new commands.CommandGoToScreen(reciever, Constants.Screen.ForcedPractice));
     addCommand(@"Go To Verify", new commands.CommandGoToScreen(reciever, Constants.Screen.Verify));
     addCommand(@"Go To Entry", new commands.CommandGoToScreen(reciever, Constants.Screen.Entry));
     currentString = Session.Instance.EntityStrings[Session.Instance.CurrentEntity];
 }
Example #25
0
        public frmSystemConfigList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "configname", "configdesc", "configvalue","configcategory", "lastmodifiedtime", "lastmodifieduser" });
        }
Example #26
0
 public frmUserList()
 {
     InitializeComponent();
     QueryParameters = new List<MESParameterInfo>();
     baseForm = new BaseForm();
     baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "userid","employeeid","username","usertype","userstatus",
         "defaultprinter","aduserid","createdtime","createduser","lastmodifiedtime","lastmodifieduser"});
 }
Example #27
0
        public frmBillCodeRuleList()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "bcrid","bcrname","basevalue",
                    "ffchars","timeformat","bcrstatus","lastmodifieduser","lastmodifiedtime" });
        }
Example #28
0
        public frmDailySchedule()
        {
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();

            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] { "prddate","checktype","custorderno","styleno","size","pairqty","ttlpairqty" });
        }
Example #29
0
        public frmPricing()
        {
            InitializeComponent();
            baseForm = new BaseForm();

            baseForm.CreateUltraGridColumns(this.grdDetail, new string[] {
                "category","sbootheight","ebootheight","checktype","effectivedate","expireddate",
                "currency","price","unit","reworkratio","reworkprice","remark" });
        }
Example #30
0
        public frmMain(string _fun)
        {
            fun = _fun;
            InitializeComponent();

            QueryParameters = new List<MESParameterInfo>();
            baseForm = new BaseForm();
            baseForm.CreateUltraGridColumns(this.grdQuery, new string[] {"customerid", "customer", "factory", "poid","styleno", "poqty","checktype", "status" });
        }
Example #31
0
 public static void InitializeUi(BaseForm mainForm)
 {
     MainForm = mainForm ?? throw new ArgumentNullException(nameof(mainForm));
     UiConfigure.GraphicsSettingResolver = GfxHelper.ApplyDisplaySettings;
 }
Example #32
0
 private void miRequestFeature_Click(object sender, EventArgs e)
 {
     BaseForm.OpenUrl(this, "https://trello.com/c/BCIHDF4b/22-feature-requests");
 }
Example #33
0
        private void InicializaControles()
        {
            List <BESearchLookUpEdit> lstSLUEUnidadMedida = new List <BESearchLookUpEdit>();

            lstSLUEUnidadMedida.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDUNIDADMEDIDA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_DESCRIPCION", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpUnidadMedida, BLUnidadMedida.ListarUnidadMedida(0, ""), lstSLUEUnidadMedida);

            List <BESearchLookUpEdit> lstSLUEImpuesto = new List <BESearchLookUpEdit>();

            lstSLUEImpuesto.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDIMPUESTO", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_NOMBRE", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpImpuesto, BLImpuesto.ListarImpuesto(0, ""), lstSLUEImpuesto);


            List <BESearchLookUpEdit> lstSLUEMoneda = new List <BESearchLookUpEdit>();

            lstSLUEMoneda.AddRange(new BESearchLookUpEdit[]
            {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDMONEDA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_NOMBRE", caption = "Descripcion"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_SIMBOLO", caption = "Simbolo"
                }
            });

            BaseForm.CargarSearchLookUpEdit(searchLookUpMonedaCompra, BLMoneda.ListarMoneda(0, ""), lstSLUEMoneda);

            List <BESearchLookUpEdit> lstSLUEProcedencia = new List <BESearchLookUpEdit>();

            lstSLUEProcedencia.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDGENERICA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_CAMPO2", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpProcedencia, BLGenerica.ListarGenerica(eTblGen.PROCEDENCIA.ToString()), lstSLUEProcedencia);


            List <BESearchLookUpEdit> lstSLUEMarca = new List <BESearchLookUpEdit>();

            lstSLUEMarca.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDMARCA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_DESCRIPCION", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpMarca, BLMarca.ListarMarca(0, ""), lstSLUEMarca);


            List <BESearchLookUpEdit> lstSLUETipoExistencia = new List <BESearchLookUpEdit>();

            lstSLUETipoExistencia.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDTIPOEXISTENCIA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_DESCRIPCION", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpTipoExistencia, BLTipoExistencia.ListarTipoExistencia(0, ""), lstSLUETipoExistencia);

            List <BESearchLookUpEdit> lstSLUETipoUso = new List <BESearchLookUpEdit>();

            lstSLUETipoUso.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDGENERICA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_CAMPO2", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpTipoUso, BLGenerica.ListarGenerica(eTblGen.TIPOUSO.ToString()), lstSLUETipoUso);


            List <BESearchLookUpEdit> lstSLUECategoria = new List <BESearchLookUpEdit>();

            lstSLUECategoria.AddRange(new BESearchLookUpEdit[] {
                new BESearchLookUpEdit {
                    fieldName = "EPI_INT_IDCATEGORIA", caption = "Id"
                },
                new BESearchLookUpEdit {
                    fieldName = "EPI_VCH_DESCRIPCION", caption = "Descripcion"
                }
            });
            BaseForm.CargarSearchLookUpEdit(searchLookUpCategoria, BLCategoria.ListarCategoria(0, ""), lstSLUECategoria);
        }
Example #34
0
        /**
         *
         * SubmitForm will insert a new record into the database
         *      it will also send an email to the appropriate parties
         * @param FormData : this is the form that needs to be inserted
         *
         **/
        public bool SubmitTravelAuthForm(User user, BaseForm webForm)
        {
            log.WriteLogEntry("Begin SubmitTravelAuthForm...");
            bool result = false;

            if (webForm.GetType() == typeof(TravelAuthForm))
            {
                TravelAuthForm travelForm   = (TravelAuthForm)webForm;
                FormTemplate   formTemplate = new FormTemplate();
                if (user.GetType() == typeof(DomainUser))
                {
                    DomainUser domainUser = (DomainUser)user;
                    travelForm.UserID         = domainUser.UserID;
                    travelForm.DHID           = domainUser.Department.DeptHeadUserID.ToString();
                    travelForm.DHEmail        = domainUser.Department.DeptHeadEmail;
                    travelForm.DHApproval     = Constants.PendingValue.ToString();
                    travelForm.DHApprovalDate = DateTime.Now.ToString();
                    travelForm.GMID           = domainUser.Company.GeneralManagerUserID.ToString();
                    travelForm.GMEmail        = domainUser.Company.GeneralManagerEmail;
                    travelForm.GMApproval     = Constants.PendingValue.ToString();
                    travelForm.GMApprovalDate = DateTime.Now.ToString();
                    travelForm.ApprovalStatus = Constants.PendingValue.ToString();
                    travelForm.SubmitDate     = DateTime.Now.ToString();
                    if (travelForm.Advance.ToLower() == "true")
                    {
                        travelForm.AdvanceStatus = Constants.PendingValue.ToString();
                    }
                    else
                    {
                        travelForm.AdvanceStatus = Constants.ApprovedValue.ToString();
                    }
                    travelForm.AdvanceDate = DateTime.Now.ToString();
                    travelForm.RecapStatus = Constants.NotStartedValue.ToString();
                    travelForm.RecapDate   = DateTime.Now.ToString();
                    travelForm.CloseStatus = Constants.PendingValue.ToString();
                    travelForm.CloseDate   = DateTime.Now.ToString();

                    // Load the job template corresponding to the templateID for the submitted form
                    log.WriteLogEntry("Starting FormDataHandler...");
                    FormDataHandler formDataHandle = new FormDataHandler(dbServer, dbName);
                    if (formDataHandle.LoadFormTemplate(formTemplate, webForm.TemplateID))
                    {
                        // Insert travel form data into the database
                        if (formDataHandle.InsertTravelAuth(travelForm, formTemplate.TableName))
                        {
                            result = true;
                        }
                        else
                        {
                            log.WriteLogEntry("FAILED insert form data to database.");
                        }
                    }
                    else
                    {
                        log.WriteLogEntry("FAILED loading form template!");
                    }
                }
            }
            else
            {
                log.WriteLogEntry("FAILED submitted form is not a travel authorization form!");
            }
            log.WriteLogEntry("End SubmitTravelAuthForm.");
            return(result);
        }
Example #35
0
        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BaseForm form = new BaseForm();

            form.ShowDialog();
        }
Example #36
0
 public FormManager()
 {
     mainForm = CreateForm <MainForm>();
     mainForm.Show();
 }
Example #37
0
        public bool SubmitTravelRecapForm(int userID, BaseForm webForm)
        {
            log.WriteLogEntry("Begin SubmitTravelRecapForm...");
            bool result = false;

            if (webForm.GetType() == typeof(TravelAuthForm))
            {
                TravelAuthForm travelForm = (TravelAuthForm)webForm;
                log.WriteLogEntry(string.Format("User {0} is recapping form {1}.", userID, travelForm.FormDataID));

                decimal registrationAmt = 0, airfareAmt = 0, rentalAmt = 0, fuelAmt = 0, parkingAmt = 0, mileageAmt = 0, lodgingAmt = 0, perdiemAmt = 0, miscAmt = 0,
                        totalAmt = 0, reimburseAmt = 0;
                int miles = 0, travelDays = 0, fullDays = 0;
                string[,] formFields  = new string[0, 0];
                string[,] formFilters = new string[0, 0];

                // Check field values for correct data type
                try
                {
                    log.WriteLogEntry("Registration Cost: " + travelForm.RecapRegistrationCost);
                    registrationAmt = decimal.Parse(travelForm.RecapRegistrationCost);
                    log.WriteLogEntry("Airfare: " + travelForm.RecapAirfare);
                    airfareAmt = decimal.Parse(travelForm.RecapAirfare);
                    log.WriteLogEntry("RentalCar: " + travelForm.RecapRentalCar);
                    rentalAmt = decimal.Parse(travelForm.RecapRentalCar);
                    log.WriteLogEntry("Fuel: " + travelForm.RecapFuel);
                    fuelAmt = decimal.Parse(travelForm.RecapFuel);
                    log.WriteLogEntry("Parking: " + travelForm.RecapParkingTolls);
                    parkingAmt = decimal.Parse(travelForm.RecapParkingTolls);
                    log.WriteLogEntry("Miles Driven: " + travelForm.RecapMileage);
                    miles = int.Parse(travelForm.RecapMileage);
                    log.WriteLogEntry("Mileage Reimbursement: " + travelForm.RecapMileageAmount);
                    mileageAmt = int.Parse(travelForm.RecapMileageAmount);
                    log.WriteLogEntry("Lodging: " + travelForm.RecapLodging);
                    lodgingAmt = decimal.Parse(travelForm.RecapLodging);
                    log.WriteLogEntry("PerDiem: " + travelForm.RecapPerDiem);
                    perdiemAmt = decimal.Parse(travelForm.RecapPerDiem);
                    log.WriteLogEntry("Travel Days: " + travelForm.RecapTravelDays);
                    travelDays = int.Parse(travelForm.RecapTravelDays);
                    log.WriteLogEntry("Full Days: " + travelForm.RecapFullDays);
                    fullDays = int.Parse(travelForm.RecapFullDays);
                    log.WriteLogEntry("Misc: " + travelForm.RecapMisc);
                    miscAmt = decimal.Parse(travelForm.RecapMisc);
                    log.WriteLogEntry("Total Recap: " + travelForm.TotalRecap);
                    totalAmt = decimal.Parse(travelForm.TotalRecap);
                    log.WriteLogEntry("Total Reimbursement: " + travelForm.TotalReimburse);
                    reimburseAmt = decimal.Parse(travelForm.TotalReimburse, System.Globalization.NumberStyles.AllowLeadingSign | System.Globalization.NumberStyles.AllowDecimalPoint);
                }
                catch (Exception ex)
                {
                    log.WriteLogEntry("ERROR in form data conversion!\n" + ex.Message);
                    return(result);
                }

                // Build field and filter list to update SQL
                try
                {
                    formFields = new string[, ] {
                        { "recap_registration_amt", registrationAmt.ToString() },
                        { "recap_airfare_amt", airfareAmt.ToString() },
                        { "recap_rental_amt", rentalAmt.ToString() },
                        { "recap_fuel_amt", fuelAmt.ToString() },
                        { "recap_parking_amt", parkingAmt.ToString() },
                        { "recap_miles", miles.ToString() },
                        { "recap_mileage_amt", mileageAmt.ToString() },
                        { "recap_lodging_amt", lodgingAmt.ToString() },
                        { "recap_perdiem_amt", perdiemAmt.ToString() },
                        { "recap_travel_days", travelDays.ToString() },
                        { "recap_full_days", fullDays.ToString() },
                        { "recap_misc_amt", miscAmt.ToString() },
                        { "misc_description", travelForm.MiscExplain },
                        { "recap_total_amt", totalAmt.ToString() },
                        { "reimburse_amt", reimburseAmt.ToString() },
                        { "recap_date", DateTime.Now.ToString() },
                        { "recap_status", Constants.PendingValue.ToString() }
                    };
                    formFilters = new string[, ] {
                        { "submitter_id", userID.ToString() },
                        { "form_id", travelForm.FormDataID.ToString() }
                    };
                }
                catch (Exception ex)
                {
                    log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                    return(result);
                }

                log.WriteLogEntry("Starting FormDataHandler...");
                FormDataHandler formData = new FormDataHandler(dbServer, dbName);
                if (formData.UpdateTravelForm(formFields, formFilters) > 0)
                {
                    result = true;
                }
                else
                {
                    log.WriteLogEntry("FAILED No records updated!");
                }
            }
            else
            {
                log.WriteLogEntry("FAILED submitted form is not a travel authorization form!");
            }
            log.WriteLogEntry("End SubmitTravelRecapForm.");
            return(result);
        }
Example #38
0
 private void miDonate_Click(object sender, EventArgs e)
 {
     BaseForm.OpenUrl(this, "https://www.buymeacoffee.com/BrokenEvent");
 }
Example #39
0
 public void MdiShow(BaseForm frm, object FuncId)
 {
     this.MdiShow(frm, FuncId, false);
 }
Example #40
0
 /// <summary>
 /// 构造函数(传入查询条件数组)
 /// </summary>
 /// <param name="ctlA">控件数组</param>
 /// <param name="qryConMethod">检索条件方法</param>
 /// <param name="qryMethod">检索方法</param>
 /// <param name="qryOPType">检索类型:0/1/2:不检索,回车检索,改变值检索</param>
 /// <param name="qryFrm">窗体,传入用于提示信息用</param>
 public WUICtrlQry(Control[] ctlA, UIMethodQryData qryConMethod, UIMethodQryData qryMethod, int qryOPType, BaseForm qryFrm)
 {
     _qryConMethod = qryConMethod;
     _qryMethod    = qryMethod;
     _qryFrm       = qryFrm;
     for (int i = 0; i < ctlA.Length; i++)
     {
         WUICtrlQryIni(ctlA[i], qryOPType);
     }
 }
Example #41
0
        private void ctrlHexViewer_ByteMouseHover(int address, Point position)
        {
            ctrlTooltip tooltip = BaseForm.GetPopupTooltip(this);

            if (address < 0 || !mnuShowLabelInfoOnMouseOver.Checked)
            {
                _lastTooltipAddress = -1;
                tooltip.Hide();
                return;
            }
            else if (_lastTooltipAddress == address)
            {
                return;
            }

            _lastTooltipAddress = address;

            CodeLabel label       = null;
            int       arrayOffset = 0;

            switch (_memoryType)
            {
            case SnesMemoryType.CpuMemory:
            case SnesMemoryType.SpcMemory:
                AddressInfo relAddress = new AddressInfo()
                {
                    Address = address,
                    Type    = _memoryType
                };
                AddressInfo absAddress = DebugApi.GetAbsoluteAddress(relAddress);
                if (absAddress.Address >= 0)
                {
                    label = LabelManager.GetLabel((uint)absAddress.Address, absAddress.Type);
                    if (label != null)
                    {
                        arrayOffset = relAddress.Address - (int)label.Address;
                    }
                }
                break;

            case SnesMemoryType.WorkRam:
            case SnesMemoryType.SaveRam:
            case SnesMemoryType.PrgRom:
            case SnesMemoryType.SpcRam:
            case SnesMemoryType.SpcRom:
                label = LabelManager.GetLabel((uint)address, _memoryType);
                if (label != null)
                {
                    arrayOffset = address - (int)label.Address;
                }
                break;
            }

            if (label != null && !string.IsNullOrWhiteSpace(label.Label))
            {
                Dictionary <string, string> values = new Dictionary <string, string>();
                if (!string.IsNullOrWhiteSpace(label.Label))
                {
                    values["Label"] = label.Label;
                    if (label.Length > 1)
                    {
                        values["Label"] += "+" + arrayOffset.ToString();
                    }
                }
                values["Address"] = "$" + (label.Address + arrayOffset).ToString("X4");
                values["Type"]    = ResourceHelper.GetEnumText(label.MemoryType);
                if (!string.IsNullOrWhiteSpace(label.Comment))
                {
                    values["Comment"] = label.Comment;
                }

                tooltip.SetTooltip(this.PointToClient(position), values);
            }
            else
            {
                tooltip.Hide();
            }
        }
Example #42
0
        public void CreateTest()
        {
            BaseForm form = new BaseForm();

            Assert.IsNotNull(form, "Expected a valid base form instance.");
        }
Example #43
0
        protected override void InPortActive(string inPort)
        {
            switch ((EnumInportName)Enum.Parse(typeof(EnumInportName), inPort))
            {
            case EnumInportName.FrameButtonStart:
                if (ClassWorkFlow.Instance.WorkFlowEnable)
                {
                    if (ThisInport(EnumInportName.FrameDoorOpen).status /* && ClassWorkFlow.Instance.DebugMode == WFDebugMode.Auto*/)
                    {
                        ClassErrorHandle.ShowError(this.Name, "不能启动或恢复流程运行:外框门被打开。", ErrorLevel.Alarm);
                        return;
                    }
                    //else if (ClassWorkFlow.Instance.DebugMode == WFDebugMode.Auto)
                    //    //自动模式下才能恢复流程
                    if (_isPausing)
                    {
                        ActionResumeWorkFlow(WFContFrom.StartButton);
                    }
                    else if (_isRunning)
                    {
                        BaseForm.DoInvokeRequired(MainForm.instance, () => MessageBox.Show(MainForm.instance, "流程正在运行中,无法开始。"));
                    }
                    else
                    {
                        if (MessageBox.Show($"当前进料方式设置为{ClassWorkFlow.Instance.LoadMode},如果正确则点“是”继续,否则点“否”则取消开始流程。", "开始流程", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
                        {
                            return;
                        }
                        else
                        {
                            ActionStartWorkFlow(WFContFrom.StartButton);
                        }
                    }
                }
                break;

            case EnumInportName.FrameButtonPause:
                if (_isRunning)
                {
                    ActionPauseWorkFlow(WFContFrom.PauseButton);
                }
                break;

            case EnumInportName.FrameButtonStop:
                ActionStopWorkFlow(WFContFrom.StopButton);
                break;

            case EnumInportName.FrameButtonEmergency:
            case EnumInportName.FrameButtonEmergency2:
                DoEmergency();
                break;

            case EnumInportName.FrameDoorOpen:
                if (_isRunning)
                {
                    //if (ClassWorkFlow.Instance.DebugMode == WFDebugMode.Auto)
                    //    //自动模式下开门才需要报警
                    ClassErrorHandle.ShowError(this.Name, "外框门被打开。", ErrorLevel.Notice, false, true);
                }
                else
                {
                    ClassErrorHandle.ShowError(this.Name, "外框门被打开。", ErrorLevel.Notice, false);
                }
                if (_safetyStatus != null)
                {
                    _safetyStatus(ThisInport(EnumInportName.FrameDoorOpen));
                }
                break;
            }
        }
 private void miDonate_Click(object sender, EventArgs e)
 {
     BaseForm.OpenUrl(this, "https://brokenevent.com/projects/obfuscarparser/donate");
 }
Example #45
0
        public bool HandleFinanceAction(int commandID, BaseForm webForm)
        {
            log.WriteLogEntry("Begin HandleFinanceAction...");
            bool result = false;

            string[,] formFields  = new string[0, 0];
            string[,] formFilters = new string[0, 0];

            if (webForm.GetType() == typeof(TravelAuthForm))
            {
                TravelAuthForm travel = (TravelAuthForm)webForm;
                switch (commandID)
                {
                case 0:     // Approve Advance
                {
                    log.WriteLogEntry("Approve advance.");
                    try
                    {
                        formFields = new string[, ] {
                            { "advance_status", Constants.ApprovedValue.ToString() },
                            { "advance_date", DateTime.Now.ToString() }
                        };
                        formFilters = new string[, ] {
                            { "form_id", travel.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                    break;
                }

                case 1:     // Approve Recap
                {
                    log.WriteLogEntry("Approve recap.");
                    try
                    {
                        formFields = new string[, ] {
                            { "recap_status", Constants.ApprovedValue.ToString() },
                            { "recap_date", DateTime.Now.ToString() },
                            { "close_status", Constants.ApprovedValue.ToString() },
                            { "close_date", DateTime.Now.ToString() }
                        };
                        formFilters = new string[, ] {
                            { "form_id", travel.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                    break;
                }

                case 2:     // Deny Advance
                {
                    log.WriteLogEntry("Deny advance.");
                    try
                    {
                        formFields = new string[, ] {
                            { "advance_status", Constants.DeniedValue.ToString() },
                            { "advance_date", DateTime.Now.ToString() }
                        };
                        formFilters = new string[, ] {
                            { "form_id", travel.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                    break;
                }

                case 3:     // Deny Recap
                {
                    log.WriteLogEntry("Deny recap.");
                    try
                    {
                        formFields = new string[, ] {
                            { "recap_status", Constants.DeniedValue.ToString() },
                            { "recap_date", DateTime.Now.ToString() }
                        };
                        formFilters = new string[, ] {
                            { "form_id", travel.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                    break;
                }

                default:
                {
                    log.WriteLogEntry("Fell through switch. No action taken.");
                    return(result);
                }
                }
                log.WriteLogEntry("Starting FormDataHandler...");
                FormDataHandler formData = new FormDataHandler(dbServer, dbName);
                if (formData.UpdateTravelForm(formFields, formFilters) > 0)
                {
                    result = true;
                }
                else
                {
                    log.WriteLogEntry("FAILED No records updated!");
                }
            }
            else
            {
                log.WriteLogEntry("FAILED not a travel form!");
            }
            log.WriteLogEntry("End HandleFinanceAction.");
            return(result);
        }
Example #46
0
 private void DoUpdateVersion()
 {
     BaseForm.OpenUrl(this, Configs.Instance.UpdateHelper.UpdateAvailable.InstallerUrl.ToString());
 }
 private void miGitHub_Click(object sender, EventArgs e)
 {
     BaseForm.OpenUrl(this, "https://github.com/BrokenEvent/ObfuscarMappingParser");
 }
Example #48
0
        public bool ApproveTravelAuthForm(int userID, BaseForm webForm)
        {
            log.WriteLogEntry("Begin ApproveTravelAuthForm...");
            bool result = false;

            string[,] formFields  = new string[0, 0];
            string[,] formFilters = new string[0, 0];

            if (webForm.GetType() == typeof(TravelAuthForm))
            {
                TravelAuthForm travelForm = (TravelAuthForm)webForm;
                log.WriteLogEntry(string.Format("User {0} is approving form {1}.", userID, travelForm.FormDataID));
                if (userID == int.Parse(travelForm.GMID))
                {
                    if (travelForm.GMApproval == Constants.DeniedColor)
                    {
                        travelForm.ApprovalStatus = Constants.DeniedColor;
                    }
                    else
                    {
                        travelForm.GMApproval     = Constants.ApprovedColor;
                        travelForm.ApprovalStatus = Constants.ApprovedColor;
                    }

                    // Build field and filter list to update SQL
                    try
                    {
                        formFields = new string[, ] {
                            { "manager_approval_date", DateTime.Now.ToString() },
                            { "manager_approval_status", GetStatusValue(travelForm.GMApproval).ToString() },
                            { "approval_date", DateTime.Now.ToString() },
                            { "approval_status", GetStatusValue(travelForm.ApprovalStatus).ToString() }
                        };
                        formFilters = new string[, ] {
                            { "manager_id", userID.ToString() },
                            { "form_id", travelForm.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                }
                else if (userID == int.Parse(travelForm.DHID))
                {
                    if (travelForm.DHApproval == Constants.DeniedColor)
                    {
                        travelForm.ApprovalStatus = Constants.DeniedColor;
                    }
                    else
                    {
                        travelForm.DHApproval = Constants.ApprovedColor;
                    }

                    // Build field and filter list to update SQL
                    try
                    {
                        formFields = new string[, ] {
                            { "supervisor_approval_date", DateTime.Now.ToString() },
                            { "supervisor_approval_status", GetStatusValue(travelForm.DHApproval).ToString() }
                        };
                        formFilters = new string[, ] {
                            { "supervisor_id", userID.ToString() },
                            { "form_id", travelForm.FormDataID.ToString() }
                        };
                    }
                    catch (Exception ex)
                    {
                        log.WriteLogEntry("ERROR building SQL field and filter arrays!\n" + ex.Message);
                        return(result);
                    }
                }
                log.WriteLogEntry("Starting FormDataHandler...");
                FormDataHandler formData = new FormDataHandler(dbServer, dbName);
                if (formData.UpdateTravelForm(formFields, formFilters) > 0)
                {
                    result = true;
                }
                else
                {
                    log.WriteLogEntry("FAILED No records updated!");
                }
            }
            else
            {
                log.WriteLogEntry("FAILED not a travel form!");
            }
            log.WriteLogEntry("End ApproveTravelAuthForm.");
            return(result);
        }
Example #49
0
 public void RegisterForm(BaseForm frm)
 {
     frm.FormClosed += onFormClosed;
     forms.Add(frm);
 }
Example #50
0
        private void rbtn_OK_Click(object sender, EventArgs e)
        {
            bool reset = false;//定义是否重新启动页面

            #region 语言设置
            try
            {
                RadListDataItem selectLanguage = (RadListDataItem)rdp_language.SelectedItem.Value;
                if (selectLanguage.Value.ToString() != AppDrill.language)
                {
                    SetValue("Language", selectLanguage.Value.ToString());
                    System.Configuration.ConfigurationManager.AppSettings["Language"] = selectLanguage.Value.ToString();
                    AppDrill.language = selectLanguage.Value.ToString();
                    reset             = true;
                }
            }
            catch
            { }
            #endregion
            #region 公英制选择
            try
            {
                RadListDataItem selectedType = (RadListDataItem)rdp_sys.SelectedItem.Value;//必须取value然后转换再获取value
                if (selectedType.Value.ToString() != "-1" && selectedType.Value.ToString() != AppDrill.UnitFormat)
                {
                    RadListDataItem selectSys = (RadListDataItem)rdp_sys.SelectedItem.Value;
                    SetValue("System", selectSys.Value.ToString());
                    System.Configuration.ConfigurationManager.AppSettings["System"] = selectSys.Value.ToString();
                    AppDrill.UnitFormat = selectedType.Value.ToString();
                    reset = true;
                }
            }
            catch { }
            #endregion

            saveDrill();



            this.Close();
            //判断是否应该进行重启
            if (reset)
            {
                BaseForm.modifyUserInfo(false);
                List <Form> disForm = new List <Form>();
                int         num     = Application.OpenForms.Count;
                for (int i = 0; i < num; i++)
                {
                    Form f = Application.OpenForms[i];
                    if (f.Name != "LoginForm")
                    {
                        disForm.Add(f);
                    }
                }
                foreach (var item in disForm)
                {
                    item.Dispose();
                }
                AppDrill.message.Clear();
                AppDrill.Command.Clear();
                //开启全部带有数据显示的界面
                LoginForm frm = new LoginForm();
                frm.Show();
            }
        }