示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            T_Part_office_ControlBox t_Part_office_ControlBox = db.T_Part_office_ControlBox.Find(id);

            db.T_Part_office_ControlBox.Remove(t_Part_office_ControlBox);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Mode,ControlColumnNo,OutputVoltage,InputVoltage,TransformerPower,Current,MaxSpeed,MaxLoad,PowerOutLet,ColumnOutLet,HandSetOutLet,ProgramOutLet,DoubleMotor,HandCranking,GasSpring,SingleMotor,GS,EN527,CE,EMC,BIFMA,UL962,DrawingNum2D,DrawingNum3D,DrawingName3D,DrawingName2D,PictureName,PictureNum,PartCode,Weight,DescriptionZH,DescriptionEN,ControlBoxWithHandSet,ControlBoxWithColumn,ControlBoxWithAccessory,TaxCost,TransferPrice,ReferencePrice,HaveRabbt,Customization,SpecialDescriptionZH,SpecialDescriptionEN,verificationCode,deleteSign,UpdateTime,CreateTime,deletePerson,CreatePerson,UpdatePerson,Remark")] T_Part_office_ControlBox t_Part_office_ControlBox)
 {
     if (ModelState.IsValid)
     {
         db.Entry(t_Part_office_ControlBox).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(t_Part_office_ControlBox));
 }
示例#3
0
        // GET: T_Part_office_ControlBox/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_Part_office_ControlBox t_Part_office_ControlBox = db.T_Part_office_ControlBox.Find(id);

            if (t_Part_office_ControlBox == null)
            {
                return(HttpNotFound());
            }
            return(View(t_Part_office_ControlBox));
        }
示例#4
0
        public T_Part_office_ControlBox GetT_Part_office_ControlBox(string mode, string langCode)
        {
            var query = from x in read_db.T_Part_office_ControlBox
                        where x.Mode == mode
                        select x;

            T_Part_office_ControlBox model = query.FirstOrDefault();

            if (model != null && model.Id > 0)
            {
                model.T_Part_office_describes = GetT_Part_office_describe(model.parametricTextIndex, langCode);
            }

            return(model);
        }
示例#5
0
        public object GetPartDetail(string partType, string Mode, string langCode)
        {
            string imgurl = string.Empty;
            int    parametricTextIndex        = 0;
            List <T_Part_office_describe> des = new List <T_Part_office_describe>();

            switch (partType)
            {
            case "column":
                T_Part_office_Column q4 = GetT_Part_office_Column(Mode, langCode);
                imgurl = q4.PictureName;
                parametricTextIndex = q4.parametricTextIndex;
                des = q4.T_Part_office_describes;
                break;

            case "frame":
                T_Part_office_Frame q5 = GetT_Part_office_Frame(Mode, langCode);
                imgurl = q5.PictureName;
                parametricTextIndex = q5.parametricTextIndex;
                des = q5.T_Part_office_describes;
                break;

            case "foot":
                T_Part_office_Foot q6 = GetT_Part_office_Foot(Mode, langCode);
                imgurl = q6.PictureName;
                parametricTextIndex = q6.parametricTextIndex;
                des = q6.T_Part_office_describes;
                break;

            case "SideBracket":
                T_Part_office_SideBracket q7 = GetT_Part_office_SideBracket(Mode, langCode);
                imgurl = q7.PictureName;
                parametricTextIndex = q7.parametricTextIndex;
                des = q7.T_Part_office_describes;
                break;

            case "ControlBox":
                T_Part_office_ControlBox q = GetT_Part_office_ControlBox(Mode, langCode);
                imgurl = q.PictureName;
                parametricTextIndex = q.parametricTextIndex;
                des = q.T_Part_office_describes;
                break;

            case "HandSet":
                T_Part_office_HandSet q2 = GetT_Part_office_HandSet(Mode, langCode);
                imgurl = q2.PictureName;
                parametricTextIndex = q2.parametricTextIndex;
                des = q2.T_Part_office_describes;
                break;

            case "Powercable":
                T_Part_office_Powercable q3 = GetT_Part_office_Powercable(Mode, langCode);
                imgurl = q3.PictureName;
                parametricTextIndex = q3.parametricTextIndex;
                des = q3.T_Part_office_describes;
                break;

            default:
                break;
            }

            var param = new
            {
                imgurl = imgurl,
                mode   = Mode,
                des    = des,
                parametricTextIndex = parametricTextIndex
            };

            return(param);
        }