public void InsertUserPlan(int loginid)
        {
            DataTable dtplantype = new DataTable();
            objBL_Common = new BL_Common();
            try
            {
                dtplantype = objBL_Common.plantypedetails("top 1 *", "EC_PlanType", "LOWER(PlanName)='FREE' and IsActive = 1 order by plandate desc");

                if (dtplantype.Rows.Count > 0)
                {
                    objUserPlan = new UserPlan();
                    objBL_UserPlan = new BL_UserPlan();
                    objUserPlan.FK_UserID = loginid;
                    objUserPlan.FK_PlanID = Convert.ToInt32(dtplantype.Rows[0]["PK_PlanID"].ToString());
                    objUserPlan.ActiveFrom = DateTime.Now;
                    objUserPlan.ActiveTo = DateTime.Now.AddMonths(1);
                    objUserPlan.IsActive = true;
                    objUserPlan.CreatedBy = loginid;
                    objUserPlan.CreatedOn = DateTime.Now;
                    objBL_UserPlan.AccessInsertUserPlan(objUserPlan);
                    string[] UPtype = new string[3];
                    UPtype[0] = Convert.ToString(dtplantype.Rows[0]["IsSingleUser"]);
                    UPtype[1] = Convert.ToString(dtplantype.Rows[0]["NOC"]);
                    UPtype[2] = Convert.ToString(dtplantype.Rows[0]["AllowedMails"]);
                    Session["lstUserPlanType"] = UPtype;

                    objUserPlan = null;
                    objBL_UserPlan = null;
                }
            }
            catch (Exception ex)
            {
                New_EmailCampaign.App_Code.GlobalFunction.StoreLog("FreeAccountSignUp.aspx:InsertUserPlan() - " + ex.Message);
            }
        }
 public void InsertUserPlan()
 {
     objUserPlan = new UserPlan();
     objBL_UserPlan = new BL_UserPlan();
     objUserPlan.FK_UserID = Convert.ToInt32(Session["UserID"].ToString());
     objUserPlan.FK_PlanID = Convert.ToInt32(Request.QueryString["PlanID"].ToString());
     objUserPlan.ActiveFrom = DateTime.Now;
     objUserPlan.ActiveTo = DateTime.Now.AddMonths(1);
     objUserPlan.IsActive = true;
     objUserPlan.CreatedBy = Convert.ToInt32(Session["UserID"].ToString());
     objUserPlan.CreatedOn = DateTime.Now;
     objBL_UserPlan.AccessInsertUserPlan(objUserPlan);
     objUserPlan = null;
     objBL_UserPlan = null;
 }
 public void AccessUpdateUserPlan(UserPlan objUserPlan1)
 {
     objDL_UserPlan.UserPlanUpdate(objUserPlan1);
 }
 public string AccessInsertUserPlan(UserPlan objUserPlan1)
 {
     string pkid = objDL_UserPlan.UserPlanInsert(objUserPlan1);
     return pkid;
 }