예제 #1
0
        public void UpdateAccountOwnerDetails(HttpContext context)
        {
            //IDictionary<string, string> AccountDetailsList = new Dictionary<string, string>();
            //IDictionary<string, string> AccountPropertiesList = new Dictionary<string, string>();
            JObject AccountDetails = JObject.Parse(context.Request["payload"]);
            int     quotationId    = Convert.ToInt32(AccountDetails.SelectToken("QuotationId").ToString());

            //OU.AccountDetails Account = new OU.AccountDetails();


            //PropertyInfo[] properties = typeof(AccountDetails).GetProperties();
            //foreach (PropertyInfo property in properties)
            //{

            //    var pNAme = property.Name;
            //    property.SetValue(Account, Convert.ToString(AccountDetails.SelectToken(pNAme)) , null);
            //}
            OU.AccountProducts accountProductProperties = new OU.AccountProducts();
            accountProductProperties.ProductAccountId = Convert.ToInt32(Convert.ToString(AccountDetails.SelectToken("AccountProductId")));

            accountProductProperties.ProductAccountName = AccountDetails.SelectToken("ContactName").ToString();
            accountProductProperties.MobileNo           = Convert.ToString(AccountDetails.SelectToken("Mobile"));
            accountProductProperties.Email   = Convert.ToString(AccountDetails.SelectToken("BusinessMailID"));
            accountProductProperties.Address = Convert.ToString(AccountDetails.SelectToken("txtContactAddress"));
            accountProductProperties.Gstin   = Convert.ToString(AccountDetails.SelectToken("GSTIN"));
            accountProductProperties.Company = Convert.ToString(AccountDetails.SelectToken("CompanyName"));
            accountProductProperties.StateId = Convert.ToInt32(Convert.ToString(AccountDetails.SelectToken("States")));
            accountProductProperties.Country = AccountDetails.SelectToken("Country").ToString();

            accountProductProperties.ProductId   = Convert.ToByte(Convert.ToString(AccountDetails.SelectToken("ProductId")));
            accountProductProperties.OwnerShipId = Convert.ToInt32(Convert.ToString(AccountDetails.SelectToken("AccountOwner")));
            Orders.BussinessLogicLayer.Accounts accountsObj = new BussinessLogicLayer.Accounts();
            context.Response.Write(accountsObj.UpdateAccountOwnerDetails(MyConf.MyConnectionString, accountProductProperties, quotationId));
        }
예제 #2
0
        public void GetAccountOwnersAndPlans(HttpContext context)
        {
            byte isProductId = 0;

            if (context.Request["ProductId"] == null || !byte.TryParse(context.Request["ProductId"].ToString(), out isProductId))
            {
                GenerateErrorResponse(400, string.Format("ProductId must be a boolean value"));
            }

            Orders.BussinessLogicLayer.Accounts accountsObj        = new BussinessLogicLayer.Accounts();
            TablePreferences statesTablePreferences                = new TablePreferences("", "", true, false);
            Dictionary <string, TablePreferences> statesDictionary = new Dictionary <string, TablePreferences>();

            statesDictionary.Add(Label.STATES, statesTablePreferences);
            context.Response.Write(accountsObj.GetAccountOwnersAndPlans(MyConf.MyConnectionString, isProductId));
        }
예제 #3
0
 public void GetAccountDetails(HttpContext context)
 {
     Orders.BussinessLogicLayer.Accounts accountsObj = new BussinessLogicLayer.Accounts();
     context.Response.Write(accountsObj.CreateAccountProducts(MyConf.MyConnectionString, Convert.ToByte(context.Request["productId"]), Convert.ToString(context.Request["accountInformationUrl"]), Convert.ToString(context.Request["mobileNumber"])));
 }