Beispiel #1
0
        // GET: CommonApi
        public JObject OrgTickUntick(int OrgId, bool Status)
        {
            OrgSetting orgSetting = OrgSetting.Getone(OrgId);

            if (orgSetting.id == 0)
            {
                orgSetting.OrgId          = OrgId;
                orgSetting.EnblDeleryChrg = 0;
                orgSetting.MinOrderAmt    = 0;
                orgSetting.DeliveryCharge = 0;
                orgSetting.OrdCanlMinTime = 0;
                orgSetting.ByCash         = 1;
                orgSetting.ByOnline       = 1;
                orgSetting.AcptMinOrd     = 1;
                orgSetting.ContactHead1   = "";
                orgSetting.Contact1       = "";
                orgSetting.ContacHead2    = "";
                orgSetting.Contact2       = "";
                orgSetting.CheckBoxStatus = Status;
                orgSetting.save();
            }
            else
            {
                orgSetting.CheckBoxStatus = Status;
                orgSetting.save();
            }
            JObject jObject = new JObject();

            jObject.Add("Status", 200);
            return(jObject);
        }
Beispiel #2
0
        public JObject OrgSettng()
        {
            var UserInfo = Request.Cookies["UserInfo"];
            int Orgid    = int.Parse(UserInfo["OrgId"]);
            HG_OrganizationDetails ObjOrg  = new HG_OrganizationDetails().GetOne(Orgid);
            OrgSetting             setting = OrgSetting.Getone(Orgid);
            JObject result      = new JObject();
            double  taxableAmt  = (setting.ParcelAmt * setting.ParcelTax) / 100;
            double  ParcelPrice = setting.ParcelAmt + taxableAmt;

            result.Add("InvoicePrint", ObjOrg.InvoicePrintting);
            result.Add("InvoiceNoOfCopy", ObjOrg.NuOfCopy);
            result.Add("OrdDisaply", ObjOrg.OrderDisplay);
            result.Add("KotPrint", ObjOrg.PrinttingType);
            result.Add("NoOfCopy", ObjOrg.Copy);
            result.Add("ParcelAmt", ParcelPrice);
            return(result);
        }
        public ActionResult OrgSettingEdit(int OrgId)
        {
            HG_OrganizationDetails ObjOrg    = new HG_OrganizationDetails().GetOne(OrgId);
            OrgSetting             OrgSeting = OrgSetting.Getone(OrgId);

            if (OrgSeting.OrgId == 0)
            {
                OrgSeting       = new OrgSetting();
                OrgSeting.OrgId = OrgId;
                if (ObjOrg.OrgTypes == "1" && OrgSeting.ByCash == 0) //restruant
                {
                    OrgSeting.ByCash   = 1;                          //yes
                    OrgSeting.ByOnline = 1;                          //NO
                }
                else if (ObjOrg.OrgTypes == "2" && OrgSeting.ByOnline == 0)
                {
                    OrgSeting.ByOnline = 1; //yes
                    OrgSeting.ByCash   = 1; //NO
                }
            }
            return(View(OrgSeting));
        }