Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TransFromDB();
         clsCommonMethods history = new clsCommonMethods();
         fvUserPaymentPanel.DataSource = history.GetWallet_Histroy();
         fvUserPaymentPanel.DataBind();
     }
 }
Esempio n. 2
0
    private void UpdateCategoryID()
    {
        try
        {
            using (var model = new Ad_ConnectionString())
            {
                clsCommonMethods _modelCat = new clsCommonMethods();
                var catList = _modelCat.GetAllCategories();
                var catIDs  = (from ct in catList
                               select ct.CategoryName_V).ToList();
                foreach (Category cat in catList)
                {
                    if (cat.SubCategory.Count > 0)
                    {
                        var orginalCat = model.Adv_Product_Commons.Where(nc => nc.CategoryID_N == null && nc.ProductCategoryName != null && nc.Ad_For > 0).Where(p => p.ProductCategoryName.Equals(cat.CategoryName_V)).ToList(); // p.cat.CategoryName.Contains(cat.CategoryName_V)).ToList();
                        orginalCat.ForEach(aa => aa.CategoryID_N = cat.CategoryID_N);                                                                                                                                             //a=>a..c.CategoryID_N=cat.CategoryID_N);
                        model.SaveChanges();


                        var orginal = model.Adv_Product_Commons.Where(nc => nc.CategoryID_N == null && nc.ProductCategoryName != null && nc.Ad_For > 0).Where(p => cat.SubCategory.Select(s => s.SubCategoryName_V).ToList().Equals(p.ProductCategoryName)).ToList(); // p.cat.CategoryName.Contains(cat.CategoryName_V)).ToList();
                        orginal.ForEach(aa => aa.CategoryID_N = cat.CategoryID_N);                                                                                                                                                                                    //a=>a..c.CategoryID_N=cat.CategoryID_N);
                        model.SaveChanges();
                    }
                    else
                    {
                        var orginal = model.Adv_Product_Commons.Where(nc => nc.CategoryID_N == null && nc.ProductCategoryName != null && nc.Ad_For > 0).Where(p => p.ProductCategoryName.Equals(cat.CategoryName_V)).ToList(); // p.cat.CategoryName.Contains(cat.CategoryName_V)).ToList();
                        orginal.ForEach(aa => aa.CategoryID_N = cat.CategoryID_N);                                                                                                                                             //a=>a..c.CategoryID_N=cat.CategoryID_N);
                        model.SaveChanges();

                        if (cat.CategoryName_V == "Mobile Phones")
                        {
                            var cateNewMap = model.Adv_Product_Commons.Where(nc => nc.CategoryID_N == null && nc.ProductCategoryName != null && nc.Ad_For > 0).Where(p => p.ProductCategoryName.Equals("Mobiles & Accessories>Mobiles")).ToList(); // p.cat.CategoryName.Contains(cat.CategoryName_V)).ToList();
                            cateNewMap.ForEach(aa => aa.CategoryID_N = cat.CategoryID_N);                                                                                                                                                          //a=>a..c.CategoryID_N=cat.CategoryID_N);
                            model.SaveChanges();
                        }
                    }
                }

                model.Dispose();
            }
        }
        catch (Exception ex)
        {
        }
    }
Esempio n. 3
0
    private void GetNewDataBaseCategory()
    {
        clsCommonMethods obj = new clsCommonMethods();
        var cate             = from newcat in obj.GetAll_VW_Products()
                               where !Categories.Select(cat => cat.CategoryName_V).ToList().Contains(newcat.CategoryName) && newcat.CategoryName != null
                               select new
        {
            NewCategory  = newcat.CategoryName,
            CategoryPath = newcat.Location
        };

        gvLiveItems.DataSource = cate.Distinct().ToList();
        gvLiveItems.DataBind();
        //if (gvLiveItems.Rows.Count > 0)
        //{
        //    gvLiveItems.UseAccessibleHeader = true;
        //    gvLiveItems.HeaderRow.TableSection = TableRowSection.TableHeader;
        //    gvLiveItems.FooterRow.TableSection = TableRowSection.TableFooter;
        //}
    }
Esempio n. 4
0
    protected void lkbUpdateValidate_Click(object sender, EventArgs e)
    {
        List <Int64> offerIds = new List <Int64>();
        //decimal FinalCommision;
        List <Transaction_Feed> feeds = new List <Transaction_Feed>();

        foreach (GridViewRow row in gvItems.Rows)
        {
            if (((CheckBox)row.FindControl("chkRow")).Checked)
            {
                Transaction_Feed item    = new Transaction_Feed();
                Int64            offerID = Convert.ToInt32(gvItems.DataKeys[row.RowIndex].Value);
                offerIds.Add(offerID);
            }
        }

        clsCommonMethods obj = new clsCommonMethods();

        obj.UpdateTransactionFeed(offerIds, Convert.ToInt16(Constants.AmountStatus.Validated));
        lblMessage.Text = "Validate User amount.";
    }
Esempio n. 5
0
    protected void lkbSendmail_Click(object sender, EventArgs e)
    {
        List <int> tIds = new List <int>();

        foreach (GridViewRow row in gvItems.Rows)
        {
            if (((CheckBox)row.FindControl("chkRow")).Checked)
            {
                int tid = Convert.ToInt32(gvItems.DataKeys[row.RowIndex].Value);
                tIds.Add(tid);
            }
        }
        MerchantModel _m      = new MerchantModel();
        var           missing = from n in _m.GetAllMissingCashBacks()
                                where tIds.Contains(n.TicketNo)
                                select n;
        clsCommonMethods client = new clsCommonMethods();

        foreach (MissingCashBack m in missing)
        {
            SendEmail(m.OrderID, m.TransactionDate.ToString(), m.AmountPaid.ToString(), m.CouponCode, m.MerchantName + "/" + m.MID, txtNote.Text);
            m.MailSend = true;
            client.UpdateCashIssue(m);
        }


        //if (offerIds.Count > 0)
        //{
        //    EventHandler delete = this.DeleteCommand;
        //    if (delete != null)
        //    {
        //        this.OfferIds = offerIds;
        //        //lblMessage.Text = string.Empty;
        //        delete(this, e);
        //        BindItems();
        //    }
        //}
    }
Esempio n. 6
0
 public ProductModel()
 {
     client = new clsCommonMethods();
 }
Esempio n. 7
0
 public ModelNotification()
 {
     client = new clsCommonMethods();
 }
Esempio n. 8
0
 public clsAssignDataCollection()
 {
     obj = new clsCommonMethods();
 }
Esempio n. 9
0
 public TransactionModel()
 {
     client = new clsCommonMethods();
 }
Esempio n. 10
0
 public ModelSubCategory()
 {
     client = new clsCommonMethods();
 }
Esempio n. 11
0
 public ModelUserProfile()
 {
     client = new clsCommonMethods();
 }
Esempio n. 12
0
 public MerchantModel()
 {
     client = new clsCommonMethods();
 }