private object GetEditObject()
        {
            if (_modelFacade == null)
            {
                _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            Model2OP model2Operation = (Model2OP)this._modelFacade.GetModel2Operation(OPID, GlobalVariables.CurrentOrganizations.First().OrganizationID);

            try
            {
                model2Operation.OPSequence = System.Int32.Parse(this.txtOperationsequenceEdit.Text.Trim());
            }
            catch
            {
                model2Operation.OPSequence = 0;
            }
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 9, this.chbOperationCheckEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 8, this.chbCompLoadingEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 7, this.chbIDMergeEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 6, this.chbStartOpEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 5, this.chbEndOpEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 4, this.chbPackEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 3, this.chbEditSPC.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 2, this.chbRepairEdit.Checked);
            model2Operation.OPControl      = FormatHelper.BooleanToString(model2Operation.OPControl, model2Operation.OPControl.Length - 1, this.chbNGTestEdit.Checked);
            model2Operation.OrganizationID = GlobalVariables.CurrentOrganizations.First().OrganizationID;
            return(model2Operation);
        }
示例#2
0
        public JsonResult Graph(Parameter _in)
        {
            ModelFacade facade = new ModelFacade();

            Session["table"] = facade.GetTable(_in);
            return(Json(new { url = "GraphResult" }));
        }
示例#3
0
 public void SetUp()
 {
     persistBroker   = new OLEDBPersistBroker("Provider=OraOLEDB.Oracle.1;Password=emes;Persist Security Info=True;User ID=emes;Data Source=sqcdemo");
     modelFacade     = new ModelFacade();
     itemFacade      = new ItemFacade();
     baseModelFacade = new BaseModelFacade();
 }
示例#4
0
        private object CheckRpeat(object obj, string type)
        {
            if (obj == null)
            {
                return(null);
            }

            switch (type)
            {
            case "Model2Item":
                BenQGuru.eMES.Domain.MOModel.Model2Item model2item = obj as BenQGuru.eMES.Domain.MOModel.Model2Item;
                ModelFacade modelfacade = new ModelFacade(this.MESProvider);
                return(modelfacade.GetModel2ItemByItemCode(model2item.ItemCode));

            case "Item":
                BenQGuru.eMES.Domain.MOModel.Item item = obj as BenQGuru.eMES.Domain.MOModel.Item;
                ItemFacade itemfacade = new ItemFacade(this.MESProvider);
                return(itemfacade.GetItem(item.ItemCode, GlobalVariables.CurrentOrganizations.First().OrganizationID));

            case "MO":
                BenQGuru.eMES.Domain.MOModel.MO mo = obj as BenQGuru.eMES.Domain.MOModel.MO;
                MOFacade mofacade = new MOFacade(this.MESProvider);
                return(mofacade.GetMO(mo.MOCode));

            default:
                return(null);
            }
        }
示例#5
0
 public MainController(IGameView gameView)
 {
     mf            = new ModelFacade();
     dc            = new DifficultyController();
     this.gameView = gameView;
     IntializeCommandMap();
 }
示例#6
0
        public void Visit(dynamic current, dynamic relative)
        {
            //* Get this table and that table name
            var currentModel  = ModelBase.Dynamic(current);
            var relativeModel = ModelBase.Dynamic(relative);

            //* set modelname
            CurrentModelName  = currentModel.ModelName;
            RelativeModelName = relativeModel.ModelName;

            //* find intermediate model name
            IntermediateModelName = ModelFacade.GenerateIntermediateModelName(CurrentModelName, RelativeModelName);
            //* Initialize target model
            IntermediateModel = ModelBase.Dynamic(ModelFacade.GenerateIntermediateModel(IntermediateModelName));

            var currModelId     = currentModel.Id;
            var relativeModelId = relativeModel.Id;

            IntermediateModel.Set(currModelId, CurrentModelName + "Id");
            IntermediateModel.Set(relativeModelId, RelativeModelName + "Id");

            var firstCol  = DbFacade.PocoDatas[IntermediateModelName].GetColumnName(CurrentModelName + "Id");
            var secondCol = DbFacade.PocoDatas[IntermediateModelName].GetColumnName(RelativeModelName + "Id");

            IntermediateModel = IntermediateModel.Find(string.Format(" {0}.{1}={3} AND {0}.{2}={4} "
                                                                     , IntermediateModel.TableName
                                                                     , firstCol, secondCol
                                                                     , currModelId
                                                                     , relativeModelId));
        }
示例#7
0
 public MainController()
 {
     mf = new ModelFacade();
     dc = new DifficultyController();
     //gameView = new GameView();
     IntializeCommandMap();
 }
示例#8
0
        private object GetEditObject()
        {
            if (this.ValidateInput())
            {
                if (_modelFacade == null)
                {
                    _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
                }
                Model model = this._modelFacade.CreateNewModel();

                model.ModelCode        = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtModelCodeEdit.Text, 40));
                model.ModelDescription = FormatHelper.CleanString(this.txtModelDescriptionEdit.Text, 100);
                model.MaintainUser     = this.GetUserCode();
                model.IsInventory      = FormatHelper.BooleanToString(this.chbIsIn.Checked);
                model.IsReflow         = FormatHelper.BooleanToString(this.chbIsReflow.Checked);
                model.IsCheckDataLink  = FormatHelper.BooleanToString(this.chbIsDataLink.Checked);
                model.DataLinkQty      = (this.chbIsDataLink.Checked?int.Parse(this.txtDataLinkQty.Text):0);
                model.IsDim            = FormatHelper.BooleanToString(this.chbIsDim.Checked);
                model.DimQty           = (this.chbIsDim.Checked?int.Parse(this.txtDimQty.Text):0);
                model.OrganizationID   = int.Parse(this.DropDownListOrg.SelectedValue);
                return(model);
            }
            else
            {
                return(null);
            }
        }
示例#9
0
        protected void cmdDelete_ServerClick(object sender, System.EventArgs e)
        {
            if (_modelFacade == null)
            {
                _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            ArrayList array = this.gridHelper.GetCheckedRows();

            if (array.Count > 0)
            {
                ArrayList models = new ArrayList(array.Count);

                foreach (GridRecord row in array)
                {
                    object model = this.GetEditObject(row);
                    if (model != null)
                    {
                        models.Add((Model)model);
                    }
                }

                this._modelFacade.DeleteModel((Model[])models.ToArray(typeof(Model)));
                this.RequestData();
                this.buttonHelper.PageActionStatusHandle(PageActionType.Delete);
            }
        }
示例#10
0
        protected void cmdAdd_ServerClick(object sender, System.EventArgs e)
        {
            if (_modelFacade == null)
            {
                _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            ArrayList array = this.gridHelper.GetCheckedRows();

            if (array.Count > 0)
            {
                ArrayList items = new ArrayList(array.Count);

                foreach (UltraGridRow row in array)
                {
                    object item = this.GetEditObject(row);
                    if (item != null)
                    {
                        items.Add((Model2Item)item);
                    }
                }

                this._modelFacade.AssignItemsToModel((Model2Item[])items.ToArray(typeof(Model2Item)));

                this.RequestData();
            }
        }
示例#11
0
 protected override void DeleteDomainObjects(ArrayList domainObjects)
 {
     if (_facade == null)
     {
         _facade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     this._facade.DeleteBarcodeRule((BarcodeRule[])domainObjects.ToArray(typeof(BarcodeRule)));
 }
 private void InitData()
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     SetEditObject(this._modelFacade.GetModel2Operation(OPID, GlobalVariables.CurrentOrganizations.First().OrganizationID));
 }
示例#13
0
 protected override void UpdateDomainObject(object domainObject)
 {
     if (_facade == null)
     {
         _facade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     this._facade.UpdateBarcodeRule((BarcodeRule)domainObject);
 }
示例#14
0
 private int GetRowCount()
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     return(this._modelFacade.GetUnSelectedRouteCountsByModelCode(FormatHelper.PKCapitalFormat(FormatHelper.CleanString(ModelCode)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtRouteCodeQuery.Text))));
 }
 protected void cmdSave_ServerClick(object sender, System.EventArgs e)
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     this._modelFacade.UpdateModel2Operation((Model2OP)GetEditObject());
 }
示例#16
0
 public void ParametersConfigured(Parameters parameters)
 {
     Parameters                = parameters;
     startingScenarioId        = parameters.scenarioId;
     Table.totalNumberOfTables = 0;
     model = new ModelFacade(parameters.nbOfCooks, parameters.nbOfCommis, parameters.nbOfDishwasher, parameters.nbOfHeadWaiter, parameters.nbOfWaiter);
     model.DiningRoom.Countertop.SubscribeToNewPlateIsReady(this);
     view.Model = model;
 }
示例#17
0
        public IActionResult ListPets()
        {
            ModelFacade facade = new ModelFacade();

            List <string>[] list = facade.SelectAllPets();
            ViewData["Message"] = "Here you go, your list of pets";

            return(View(list));
        }
示例#18
0
 public DifficultyController()
 {
     mf = new ModelFacade();
     playerStatusTracker = new List <double>();
     playerStatus        = 1;
     CalcEndLocationChance();
     CalcEventModifier();
     CalcEventChance();
 }
示例#19
0
 private void gridWebGrid_DblClick(object sender, Infragistics.WebUI.UltraWebGrid.ClickEventArgs e)
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     this.ViewState["opid"] = e.Row.Cells[5].ToString();
     SetEditObject(this._modelFacade.GetModel2Operation(OPID, GlobalVariables.CurrentOrganizations.First().OrganizationID));
 }
示例#20
0
        static void Main(string[] args)
        {
            Console.WriteLine("Console debug du controller");
            ModelFacade model = new ModelFacade(2, 2, 1, 2, 2);
            ViewFacade  view  = new ViewFacade(model);

            new ControllerFacade(model, view);
            Console.ReadLine();
        }
示例#21
0
    private void getSessionData()
    {
        TechnicianDTO dto        = (TechnicianDTO)Session["TechnicianDTO"];
        ModelFacade   facade     = new ModelFacade();
        Technician    technician = facade.createTechnician(dto);

        lblID.Text   = technician.technicianID;
        lblName.Text = technician.technicianName;
        lblType.Text = technician.technicianType;
    }
        protected void cmdReturn_ServerClick(object sender, System.EventArgs e)
        {
            if (_modelFacade == null)
            {
                _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
            }
            Model2OP model2Operation = (Model2OP)this._modelFacade.GetModel2Operation(OPID, GlobalVariables.CurrentOrganizations.First().OrganizationID);

            Response.Redirect(this.MakeRedirectUrl("FModelRouteOperationSP.aspx", new string[] { "modelcode", "routecode" }, new string[] { model2Operation.ModelCode, model2Operation.RouteCode }));
        }
示例#23
0
        public JsonResult Evaluate(Parameter _in)
        {
            ModelFacade facade = new ModelFacade();

            Session["data"] = new Data {
                fx = _in.fx, a = _in.a
            };
            Session["evaluate"] = facade.GetEvaluacion(_in);
            return(Json(new { url = "EvaluateResult" }));
        }
示例#24
0
 private object[] LoadDataSource(int inclusive, int exclusive)
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     return(this._modelFacade.GetUnSelectedRoutesByModelCode(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(ModelCode)), FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtRouteCodeQuery.Text)),
                inclusive, exclusive));
 }
示例#25
0
 protected override int GetRowCount()
 {
     if (_facade == null)
     {
         _facade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     return(this._facade.QueryIllegibilityCounts(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpModelCodeQuery.SelectedValue)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtAModelCodeQuery.Text))));
 }
示例#26
0
    protected void btnSubmitData_Click(object sender, EventArgs e)
    {
        CustomerFormDTO dto      = (CustomerFormDTO)Session["CustomerFormDTO"];
        ModelFacade     facade   = new ModelFacade();
        Customer        customer = facade.createCustomer(dto);
        CustomerDAO     doa      = new CustomerDAO();

        doa.saveCustomer(customer);
        Session.Abandon();
        Response.Redirect("~/Staff/AdminHome.aspx");
    }
示例#27
0
 private int GetRowCount()
 {
     if (_modelFacade == null)
     {
         _modelFacade = new FacadeFactory(base.DataProvider).CreateModelFacade();
     }
     return(this._modelFacade.GetUnSelectedItemsCounts(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(ModelCode)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeQuery.Text)), FormatHelper.CleanString(this.txtItemNameQuery.Text), FormatHelper.CleanString(this.drpItemTypeQuery.SelectedValue)
                ));
 }
示例#28
0
    private void getSessionData()
    {
        JobsDTO     dto    = (JobsDTO)Session["JobsDTO"];
        ModelFacade facade = new ModelFacade();
        Jobs        job    = facade.createJob(dto);

        lblJobID.Text        = job.jobID;
        lblItemID.Text       = job.itemID;
        lblTechID.Text       = job.techID;
        lblDateAssigned.Text = job.dateAssigned;
    }
示例#29
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        JobsDTO     dto    = (JobsDTO)Session["JobsDTO"];
        ModelFacade facade = new ModelFacade();
        Jobs        job    = facade.createJob(dto);
        JobsDAO     dao    = new JobsDAO();

        dao.issueJob(job);
        Session.Abandon();
        Response.Redirect("~/Staff/AdminHome.aspx");
    }
示例#30
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ItemsDTO    dto    = (ItemsDTO)Session["ItemsDTO"];
        ModelFacade facade = new ModelFacade();
        Items       item   = facade.createItem(dto);
        ItemsDAO    dao    = new ItemsDAO();

        dao.bookInItem(item);
        Session.Abandon();
        Response.Redirect("~/Staff/AdminHome.aspx");
    }