Beispiel #1
0
        public HttpResponseMessage SaveUpdateWeavingLoom(object[] data)
        {
            vmWeavingLoomDataMasterDetail        itemMaster       = JsonConvert.DeserializeObject <vmWeavingLoomDataMasterDetail>(data[0].ToString());
            List <vmWeavingLoomDataMasterDetail> MainDetail       = JsonConvert.DeserializeObject <List <vmWeavingLoomDataMasterDetail> >(data[1].ToString());
            List <vmWeavingLoomDataMasterDetail> MachinStopDetail = JsonConvert.DeserializeObject <List <vmWeavingLoomDataMasterDetail> >(data[2].ToString());
            vmCmnParameters objcmnParam = JsonConvert.DeserializeObject <vmCmnParameters>(data[3].ToString());

            string result = "";

            try
            {
                if (ModelState.IsValid && itemMaster != null && MainDetail.Count > 0)
                {
                    result = objLoomDataService.SaveUpdateWeavingLoom(itemMaster, MainDetail, MachinStopDetail, objcmnParam);
                }
                else
                {
                    result = "";
                }
            }
            catch (Exception e)
            {
                e.ToString();
                result = "";
            }
            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }
Beispiel #2
0
        public IHttpActionResult GetWeavingLoomDataMasterByID(object[] data)
        {
            vmWeavingLoomDataMasterDetail SinglLoomMaster = null;
            vmCmnParameters objcmnParam = JsonConvert.DeserializeObject <vmCmnParameters>(data[0].ToString());

            try
            {
                SinglLoomMaster = objLoomDataService.GetWeavingLoomDataMasterByID(objcmnParam);
            }
            catch (Exception e)
            {
                e.ToString();
            }

            return(Json(new
            {
                SinglLoomMaster
            }));
        }