public T_Part_office_SideBracket GetT_Part_office_SideBracket(string mode, string langCode) { var query = from x in read_db.T_Part_office_SideBracket where x.Mode == mode select x; T_Part_office_SideBracket 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); }