public ActionResult DeleteConfirmed(int id) { T_Part_office_HandSet t_Part_office_HandSet = db.T_Part_office_HandSet.Find(id); db.T_Part_office_HandSet.Remove(t_Part_office_HandSet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Mode,HaveScreen,ScreenType,Touch,Button,HaveUsb,Imbedding,Remote,BlueTooth,MemoryKeys,OutputVoltage,InputVoltage,TransformerPower,Voltage,Current,HandSetOutLet,DoubleMotor,HandCranking,GasSpring,SingleMotor,GS,EN527,CE,EMC,BIFMA,UL962,DrawingNum2D,DrawingNum3D,DrawingName3D,DrawingName2D,PictureName,PictureNum,PartCode,Weight,DescriptionZH,DescriptionEN,HandsetWithControlBox,HandsetWithAccessory,TaxCost,TransferPrice,ReferencePrice,HaveRabbet,Customization,SpecialDescriptionZH,SpecialDescriptionEN,verificationCode,deleteSign,UpdateTime,CreateTime,deletePerson,CreatePerson,UpdatePerson,Remark")] T_Part_office_HandSet t_Part_office_HandSet) { if (ModelState.IsValid) { db.Entry(t_Part_office_HandSet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_Part_office_HandSet)); }
// GET: T_Part_office_HandSet/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } T_Part_office_HandSet t_Part_office_HandSet = db.T_Part_office_HandSet.Find(id); if (t_Part_office_HandSet == null) { return(HttpNotFound()); } return(View(t_Part_office_HandSet)); }
public T_Part_office_HandSet GetT_Part_office_HandSet(string mode, string langCode) { var query = from x in read_db.T_Part_office_HandSet where x.Mode == mode select x; T_Part_office_HandSet model = query.FirstOrDefault(); if (model != null && model.Id > 0) { model.T_Part_office_describes = GetT_Part_office_describe(model.parametricTextIndex, langCode); } return(model); }
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); }