Exemplo n.º 1
0
 public IHttpActionResult GetQouationDetailByPartNumber(object obj)
 {
     try
     {
         Bis.QouationDetailMethod    BisQouationDetail = new Bis.QouationDetailMethod();
         ViewModel.tblQouationDetail getQouationDetail = new ViewModel.tblQouationDetail();
         JObject JsonObject = JObject.Parse(obj.ToString());
         getQouationDetail.PartNumber = JsonObject["PartNumber"].ToString();
         JArray JsonPurchaseOrder = BisQouationDetail.GetQouationDetailByPartNumber(getQouationDetail);
         return(Ok(JsonPurchaseOrder));
     }
     catch (Exception ex)
     {
         return(NotFound());
     }
 }
Exemplo n.º 2
0
 public IHttpActionResult DeleteSelectedQouationDetail(object obj)
 {
     try
     {
         Bis.QouationDetailMethod    BisQouationDetail = new Bis.QouationDetailMethod();
         ViewModel.tblQouationDetail getQouationDetail = new ViewModel.tblQouationDetail();
         JObject JsonObject = JObject.Parse(obj.ToString());
         getQouationDetail.ItemsSelected = JsonObject["ItemsSelected"].ToString();
         bool JsonQouation = BisQouationDetail.DeleteSelectedQouationDetail(getQouationDetail);
         return(Ok(JsonQouation));
     }
     catch
     {
         return(NotFound());
     }
 }
Exemplo n.º 3
0
        public IHttpActionResult GetSumsColumnsOfQouationDetail(object obj)
        {
            try
            {
                Bis.QouationDetailMethod    BisQouationDetail = new Bis.QouationDetailMethod();
                ViewModel.tblQouationDetail getQouationDetail = new ViewModel.tblQouationDetail();

                JObject JsonObject = JObject.Parse(obj.ToString());
                getQouationDetail.IDQouationFile = JsonObject["IDQouationFile"].ToString().StringToGuid();
                JArray JsonQouation = BisQouationDetail.GetSumsColumnsOfQouationDetail(getQouationDetail);
                return(Ok(JsonQouation));
            }
            catch
            {
                return(NotFound());
            }
        }
Exemplo n.º 4
0
        public IHttpActionResult AddAllQouationDetail(object obj)
        {
            try
            {
                AuthorizationUser AuUser = new AuthorizationUser();

                Bis.QouationDetailMethod    BisQouationDetail = new Bis.QouationDetailMethod();
                ViewModel.tblQouationDetail getQouationDetail = new ViewModel.tblQouationDetail();
                JObject JsonObject = JObject.Parse(obj.ToString());
                getQouationDetail.AllDetailJson  = JsonObject["AllDetailJson"].ToString();
                getQouationDetail.IDQouationFile = JsonObject["IDQouationFile"].ToString().StringToGuid();
                getQouationDetail.IDPersonel     = AuUser.ReturnIDUser(JsonObject["IDLogUser"].ToString().StringToGuid());
                getQouationDetail.RatioChfToEu   = JsonObject["RatioChfToEu"].ToString().StringToDecimal();

                bool JsonQouation = BisQouationDetail.AddAllQouationDetail(getQouationDetail);
                return(Ok(JsonQouation));
            }
            catch
            {
                return(NotFound());
            }
        }
Exemplo n.º 5
0
 public bool DeleteSelectedQouationDetail(ViewModel.tblQouationDetail QouationDetail)
 {
     return(sqlHelper.RunProcedure("sp_tblQouationDetail_DeleteSelectedQouationDetail", QouationDetail) > 0);
 }
Exemplo n.º 6
0
 public bool AddAllQouationDetail(ViewModel.tblQouationDetail QouationDetail)
 {
     return(sqlHelper.RunProcedure("sp_tblQouationDetail_AddAllQouationDetail", QouationDetail, true) > 0);
 }
Exemplo n.º 7
0
 public JArray GetQouationDetailByPartNumber(ViewModel.tblQouationDetail QouationDetail)
 {
     return(sqlHelper.ReturnJsonData("sp_tblQouationDetail_GetJsonDataByPartNumber", QouationDetail));
 }
Exemplo n.º 8
0
 public JArray GetSumsColumnsOfQouationDetail(ViewModel.tblQouationDetail QouationDetail)
 {
     return(sqlHelper.ReturnJsonData("sp_tblQouationDetail_GetSumsColumns", QouationDetail));
 }