Example #1
0
    protected void btnSaveClose_Click(object sender, EventArgs e)
    {
        btnSaveClose.Enabled = false;
        if (txtLot.Text == "")
        {
            JScript.Alert("请刷入批次号", this);
            return;
        }

        //string result = Electroplate.EletroplateCheckIn(txtLot.Text,
        //                                ddlEqp.SelectedValue,
        //                                ddlWorkshop.SelectedValue,
        //                                lblWorksiteID.Text,
        //                                System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString()
        //                                );
        string result = Carve.CarveCheckIn(txtLot.Text,
                                           ddlEqp.SelectedValue,
                                           ddlWorkshop.SelectedValue,
                                           lblWorksiteID.Text,
                                           System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString()
                                           );


        btnSaveClose.Enabled = true;
        if (result == "success")
        {
            JScript.Alert("精雕进站成功!", this);
            ClearInfo();

            return;
        }
        else
        {
            JScript.Alert("精雕进站失败!", this);
            return;
        }
    }
Example #2
0
    protected void btnSaveClose_Click(object sender, EventArgs e)
    {
        //string a = ddlWorkshop.SelectedValue;
        if (txtLot.Text == "")
        {
            JScript.Alert("请刷入批次号", this);
            return;
        }
        #region//========防止重复出站 add by lei.xue on 2017-8-29=======================
        //查询是否可以过站
        string result1 = CRUD.QueryStationOfLot(lblWorksiteID.Text, txtLot.Text);
        if (result1 != "success")
        {
            JScript.Alert(result1, this);
            txtLot.Text = "";
            return;
        }
        #endregion
        //检查是否是标签条码
        string strLabel = "";
        if (txtLot.Text.Length > 3)
        {
            strLabel = txtLot.Text;
        }

        string result = "";
        if (cbxReworkID.Checked == false)
        {
            //增加剩余厚度、钻石刀号、雕刻次数 modify by lei.xue on 2017-4-13=========================
            result = Carve.CarveCheckOut(txtLot.Text, txtLabelInfo.Text, ddlEqp.SelectedValue, ddlWorkshop.Text, lblWorksiteID.Text
                                         , System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString(), txtDKWidth.Text, ddlMouldStructure.SelectedValue, ddlMouldPitch.SelectedValue,
                                         txtRestThinkness.Text,
                                         txtDiamondCutterNo.Text,
                                         txtDKQty.Text);
            if (result == "success")
            {
                //打印标签调用前台方法
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>PrintLabel();</script>");
                //JScript.Alert("精雕出站成功!", this);
                //ClearInfo();
                return;
            }
            else
            {
                JScript.Alert("精雕出站失败!", this);
                return;
            }
        }
        else
        {
            #region 变更返工流程 M10是外发flow
            //string strFlow = "";
            //if (ddlWorksite.SelectedValue == "M10")
            //{
            //    strFlow = "flow003";
            //}
            //else
            //{
            //    strFlow = "flow001";
            //}
            string resultFlow = CRUD.ChangLotWorkflow(ddlWorkflow.SelectedValue, txtLot.Text.Substring(0, 3).ToString());
            if (resultFlow != "success")
            {
                JScript.Alert("变更产品流程出错!", this);
                return;
            }
            #endregion


            //返工站点的流程编号
            //string Flowidno="";
            //Flowidno = CRUD.GetFlowidno(txtLot.Text,ddlWorksite.SelectedValue);
            //增加剩余厚度、钻石刀号、雕刻次数 modify by lei.xue on 2017-4-13=========================
            result = Carve.CarveCheckOut(txtLot.Text, "", ddlEqp.SelectedValue, ddlWorkshop.Text, lblWorksiteID.Text
                                         , System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString(), txtDKWidth.Text, ddlMouldStructure.SelectedValue, ddlMouldPitch.SelectedValue,
                                         txtRestThinkness.Text,
                                         txtDiamondCutterNo.Text,
                                         txtDKQty.Text);
            #region 返工记录
            //返工站点的流程编号
            string Flowidno = "";
            Flowidno = CRUD.GetReworkFlowidno(ddlWorkflow.SelectedValue, ddlWorksite.SelectedValue); //CRUD.GetFlowidno(txtLot.Text.Substring(0, 3).ToString(), ddlWorksite.SelectedValue);
            //记录返工记录
            CRUD.rework(lblWorksiteID.Text, ddlWorksite.SelectedValue, txtLot.Text.Substring(0, 3).ToString(),
                        System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString(), Flowidno);
            #endregion
            //记录返工记录
            //CRUD.rework(lblWorksiteID.Text, ddlWorksite.SelectedValue, txtLot.Text,
            //             System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString(), Flowidno);
            //变更返工流程 M10是外发flow
            //if (ddlWorksite.SelectedValue == "M10")
            //{
            //  string resultFlow=  CRUD.ChangLotWorkflow("flow003", txtLot.Text);

            //  if (result != "success")
            //  {
            //      JScript.Alert("变更产品流程出错!", this);
            //      return;
            //  }
            //}


            if (result == "success")
            {
                JScript.Alert("精雕出站成功!", this);
                ClearInfo();
                return;
            }
            else
            {
                JScript.Alert("精雕出站失败!", this);
                return;
            }
        }
    }
Example #3
0
        public Player()
        {
            this.Type                  = PlayerTypes.Player;
            this.Level                 = 1;
            this.Description           = this.Description ?? "You see nothing special about them.";
            this.AlignmentScore        = 0;
            this.TotalExperience       = 0;
            this.Experience            = 0;
            this.ExperienceToNextLevel = 1000; // create class to work out
            this.HitPoints             = 32;   // class to workout
            this.MaxHitPoints          = 32;
            this.ManaPoints            = 50;
            this.MaxManaPoints         = 50;
            this.MovePoints            = 60;
            this.MaxMovePoints         = 60;
            this.Explored              = 1;
            this.HitRoll               = 1;
            this.DamRoll               = 1;
            this.Wimpy                 = 10;
            this.Hours                 = 0;
            this.Weight                = 0;
            this.MaxWeight             = 70;                    // class to workout
            this.Status                = PlayerStatus.Standing; // enum property? 1 standing
            this.Target                = null;
            this.Inventory             = this.Inventory ?? (this.Inventory = new ItemContainer());


            this.Skills = new List <Skill>()
            {
                //Forage.ForageAb(),
                //Chopping.ChoppingAb(),
                //Carving.CarvingAb(),
                //Crafting.CraftingAb(),
                //Brewing.BrewingAb(),
                //Cook.CookAb(),
                //Knitting.KnittingAb(),
                //Carving.CarvingAb(),
                Swim.SwimAb()
            };


            //kills
            this.MobKills  = 0;
            this.MobDeaths = 0;
            this.Pkills    = 0;
            this.PkDeaths  = 0;
            this.PkPoints  = 0;

            //Money
            this.Gold   = 0;
            this.Silver = 5;
            this.Copper = 100;

            //Location
            this.Region = "Tutorial";
            this.Area   = "Tutorial";
            this.AreaId = 0;

            //Eq
            this.Equipment          = this.Equipment ?? (this.Equipment = new Equipment());
            this.Equipment.Floating = this.Equipment.Floating;
            this.Equipment.Head     = Equipment.Head;
            this.Equipment.Face     = Equipment.Face;
            this.Equipment.Neck     = Equipment.Neck;
            this.Equipment.Neck2    = Equipment.Neck2;
            this.Equipment.Body     = Equipment.Body;
            this.Equipment.Waist    = Equipment.Waist;
            this.Equipment.Legs     = Equipment.Legs;
            this.Equipment.Feet     = Equipment.Feet;

            this.Practices   = 10;
            this.Trains      = 10;
            this.KnownByName = true;

            this.QuestLog          = new List <Quest>();
            this.Quest             = new List <Quest>();
            this.EventWake         = "";
            this.EventOnEnter      = "";
            this.EventOnComunicate = new Dictionary <string, string>();

            var recall = new Recall
            {
                Area   = "Anker",
                AreaId = 0,
                Region = "Anker"
            };


            this.Recall = recall;

            this.CraftingRecipes.Add(MIMWebClient.Core.World.Crafting.Crafting.CampFire().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Crafting.Crafting.PineLog().Name);
            this.CraftingRecipes.Add(Recipes.SmokedChub().Name);

            this.CraftingRecipes.Add(Recipes.BoiledCarp().Name);
            this.CraftingRecipes.Add(Recipes.PeasantStew().Name);
            this.CraftingRecipes.Add(Recipes.SeasonedBream().Name);


            this.CraftingRecipes.Add(Recipes.BoiledCarp().Name);
            this.CraftingRecipes.Add(Recipes.FishStew().Name);
            this.CraftingRecipes.Add(Recipes.Bread().Name);

            this.CraftingRecipes.Add(Recipes.FriedTrout().Name);
            this.CraftingRecipes.Add(Recipes.TurtleSoup().Name);
            this.CraftingRecipes.Add(Recipes.FriedEel().Name);
            this.CraftingRecipes.Add(Recipes.FrogLegs().Name);


            this.CraftingRecipes.Add(Alchemy.BurnCream().Name);
            this.CraftingRecipes.Add(Alchemy.Antivenom().Name);
            this.CraftingRecipes.Add(Alchemy.LavenderPerfume().Name);
            this.CraftingRecipes.Add(Alchemy.Antibiotic().Name);
            this.CraftingRecipes.Add(Alchemy.Antiseptic().Name);

            this.CraftingRecipes.Add(Smithing.Lantern().Name);
            this.CraftingRecipes.Add(Smithing.CopperSword().Name);
            this.CraftingRecipes.Add(Smithing.CopperMace().Name);
            this.CraftingRecipes.Add(Smithing.CopperAxe().Name);
            this.CraftingRecipes.Add(Smithing.CopperDagger().Name);
            this.CraftingRecipes.Add(Smithing.CopperFlail().Name);

            this.CraftingRecipes.Add(Carve.WoodenRaft().Name);
            this.CraftingRecipes.Add(Carve.WoodenTorch().Name);
            this.CraftingRecipes.Add(Carve.WoodenChest().Name);

            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothBoots().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothGloves().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothHelmet().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothLeggings().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothShirt().Name);
            this.CraftingRecipes.Add(MIMWebClient.Core.World.Knitting.Knitting.WoolenClothSleeves().Name);
        }