Esempio n. 1
0
        public SPResponse ActiveInactiveBillingPartnerProduct(int BillingPartnerProductId)
        {
            BOTS_TblBillingPartnerProduct objbillingpartnerproduct = new BOTS_TblBillingPartnerProduct();
            SPResponse result = new SPResponse();

            using (var context = new CommonDBContext())
            {
                objbillingpartnerproduct = context.BOTS_TblBillingPartnerProduct.Where(x => x.BillingPartnerProductId == BillingPartnerProductId).FirstOrDefault();

                if (objbillingpartnerproduct.IsActive == true)
                {
                    objbillingpartnerproduct.IsActive = false;
                }
                else
                {
                    objbillingpartnerproduct.IsActive = true;
                }

                context.BOTS_TblBillingPartnerProduct.AddOrUpdate(objbillingpartnerproduct);
                context.SaveChanges();
                result.ResponseCode    = "00";
                result.ResponseMessage = "Billing Partner product Updated Successfully";
            }
            return(result);
        }
        public ActionResult AddBillingPartnerProduct(string jsonData)
        {
            SPResponse result           = new SPResponse();
            var        userDetails      = (CustomerLoginDetail)Session["UserSession"];
            string     BillingPartnerId = "";

            try
            {
                JavaScriptSerializer json_serializer = new JavaScriptSerializer();
                json_serializer.MaxJsonLength = int.MaxValue;
                object[] objData = (object[])json_serializer.DeserializeObject(jsonData);
                BOTS_TblBillingPartnerProduct objbillingpartnerproduct = new BOTS_TblBillingPartnerProduct();
                foreach (Dictionary <string, object> item in objData)
                {
                    objbillingpartnerproduct.BillingPartnerProductName = Convert.ToString(item["BillingPartnerproductNm"]);
                    objbillingpartnerproduct.BillingPartnerId          = Convert.ToInt32(item["BillingPartnerId"]);
                    objbillingpartnerproduct.CreatedBy   = userDetails.LoginId;
                    objbillingpartnerproduct.CreatedDate = DateTime.Now;
                    BillingPartnerId = Convert.ToString(item["BillingPartnerId"]);
                    objbillingpartnerproduct.IsActive = Convert.ToBoolean(item["IsActive"]);
                    if (BillingPartnerId != "")
                    {
                        objbillingpartnerproduct.BillingPartnerId = Convert.ToInt32(BillingPartnerId);
                    }
                    else
                    {
                    }
                }
                result = COR.AddBillingPartnerProduct(objbillingpartnerproduct);
            }
            catch (Exception ex)
            {
            }
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        //for edit
        public BOTS_TblBillingPartnerProduct GetBillingPartnerProductByProductId(int BillingpartnerProductId)
        {
            BOTS_TblBillingPartnerProduct objbillingpartner = new BOTS_TblBillingPartnerProduct();

            using (var context = new CommonDBContext())
            {
                objbillingpartner = context.BOTS_TblBillingPartnerProduct.Where(x => x.BillingPartnerProductId == BillingpartnerProductId).FirstOrDefault();
            }
            return(objbillingpartner);
        }
        public ActionResult GetBillingPartnerProductByPartner(int BillingpartnerProductId)
        {
            BOTS_TblBillingPartnerProduct lstbillingpartnerproduct = new BOTS_TblBillingPartnerProduct();

            try
            {
                lstbillingpartnerproduct = COR.GetBillingPartnerProductByProductId(BillingpartnerProductId);
            }
            catch (Exception ex)
            {
            }
            return(Json(lstbillingpartnerproduct, JsonRequestBehavior.AllowGet));
        }
Esempio n. 5
0
        public SPResponse AddBillingPartnerProduct(BOTS_TblBillingPartnerProduct objtblbillingpartnerproduct)
        {
            SPResponse result = new SPResponse();

            try
            {
                using (var context = new CommonDBContext())
                {
                    context.BOTS_TblBillingPartnerProduct.AddOrUpdate(objtblbillingpartnerproduct);
                    context.SaveChanges();
                    result.ResponseCode    = "00";
                    result.ResponseMessage = "Billing Partner Product Added Successfully";
                }
            }
            catch (Exception ex)
            {
                newexception.AddException(ex, "onboarding_master");
            }
            return(result);
        }