Ejemplo n.º 1
0
        protected void RedeemBut_Click(object sender, EventArgs e)
        {
            if ((Request.QueryString["rewardid"] != null) && (Request.QueryString["promotionid"] != null))
            {
                if ((Request.QueryString["userid"] != null) && (Request.QueryString["clientid"] != null))
                {
                    int  clientid = int.Parse(Request.QueryString["clientid"]);
                    Guid userid   = new Guid(Request.QueryString["userid"]);
                    var  db       = new ApplicationServices.ApplicationServicesDB();
                    using (var scope = db.GetTransaction())
                    {
                        int rewardid    = int.Parse(Request.QueryString["rewardid"]);
                        int promotionid = int.Parse(Request.QueryString["promotionid"]);
                        var reward      = ClientManager.getReward(rewardid);
                        var promotion   = ClientManager.getPromotion(promotionid);
                        PromotionByProductProductReward promotionByProductProductReward = ClientManager.getPromotionByProductProductRewardByPromotionIdRewardId(promotionid, rewardid);
                        var product = ClientManager.getProduct(promotionByProductProductReward.productid);

                        var redemptionMemberClient = ClientManager.getRedemptionMemberClient(
                            userid, clientid);

                        //get receipt path
                        string filename = Session["filename"].ToString();
                        Session.Remove("filename");
                        //insert redemptionbyproductreceipt
                        int redemptionbyproductreceiptid = ClientManager.insertRedemptionByProductReceipt(
                            clientid, userid,
                            filename, (int)RedemptionByProductReceiptState.PENDING_PROCESS,
                            "", -1,
                            null,
                            promotion.promotionid, promotion.name,
                            int.Parse(CollectionModeRBL.SelectedValue), RemarksTB.Text.Trim());

                        MembershipUser user = Membership.GetUser(userid);
                        //reduce qty of reward by 1
                        //   ClientManager.reduceRewardQtyBy1(reward.rewardid);
                        var    client    = ClientManager.getClient(clientid);
                        string emailpath = Config.MainSiteRootUrl + client.siterelativepath + client.logoimagename;
                        //  string emailLogoUrl = Config.SiteRootUrl + client.logoimagename;

                        Hashtable values = new Hashtable();
                        values.Add("[/logo/]", emailpath);
                        var redemptionMember = ClientManager.getRedemptionMember((Guid)Membership.GetUser().ProviderUserKey);
                        //bool canSendEmail = EmailManager.SendClaimProductAckMail(
                        //                          user.Email,
                        //                          redemptionMember.firstname,
                        //                          values, clientid,this.Response);


                        scope.Complete();

                        Logger.LogInfo(Membership.GetUser().UserName + "- submitted redeemp by product username :"******"MemberRedeemByProductAck.aspx?clientid=" + clientid);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected void UpdateRedemptionBut_Click(object sender, EventArgs e)
        {
            int redemptionrewardid = int.Parse(UpdateRedemptionBut.CommandArgument);
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                ClientManager.updateRedemptionRedemptionReward(
                    redemptionrewardid,
                    int.Parse(CollectionModeRBL.SelectedValue), int.Parse(StatusDDL.SelectedValue));

                ClientDetailPnl.Visible = false;


                //        ClientManager.updateRedemptionByProductReceipt(
                //redemptionbyproductreceiptid,
                //   int.Parse(StatusDDL.SelectedValue),
                // InvoiceNoTB.Text.Trim(), int.Parse(ResellerDDL2.SelectedValue),
                //   PurchaseDateRadDatePicker.SelectedDate,
                //    int.Parse(PromotionDDL.SelectedValue), PromotionDDL.SelectedItem.Text);


                /*    ClientManager.approveRedemptionByPointReceipt(
                 *      redemptionbypointreceiptid,
                 *      int.Parse(ResellerDDL2.SelectedValue),
                 *      InvoiceNoTB.Text.Trim(),
                 *      (DateTime)PurchaseDateRadDatePicker.SelectedDate);
                 *  RedemptionByPointReceipt redemptionByPointReceipt = ClientManager.getRedemptionByPointReceipt(redemptionbypointreceiptid);
                 *  RedemptionMemberClient redemptionMemberClient = ClientManager.getRedemptionMemberClient(
                 *      redemptionByPointReceipt.UserId,
                 *      redemptionByPointReceipt.clientid);
                 *  int newPointBalance = redemptionMemberClient.pointbalance + redemptionByPointReceipt.totalpoints;
                 *
                 *  //RedemptionByPointTransaction
                 *  string notes = "Receipt ID:" + redemptionByPointReceipt.redemptionbypointreceiptid +
                 *      " | Points:" + redemptionByPointReceipt.totalpoints;
                 *  ClientManager.insertRedemptionByPointTransaction(
                 *      redemptionByPointReceipt.UserId,
                 *      redemptionByPointReceipt.clientid,
                 *      (int)RedemptionByPointTransactionType.DEBIT,
                 *      redemptionByPointReceipt.totalpoints,
                 *      newPointBalance,
                 *      notes);
                 *  ClientManager.updateRedemptionMemberClientBalance(
                 *      redemptionByPointReceipt.UserId,
                 *     redemptionByPointReceipt.clientid,
                 *     newPointBalance);
                 */
                scope.Complete();
            }
            //reload radgrid
            // var x = ClientManager.getAllRedemptionByPointReceiptPendingProcess();
            //ReceiptRadGrid.DataSource = x;
            // ReceiptRadGrid.Rebind();
            RedemptionRewardRadGrid.Rebind();

            Logger.LogInfo(Membership.GetUser().UserName + "- updated Redemption ID:" + redemptionrewardid
                           , this.GetType());
        }
Ejemplo n.º 3
0
        protected void VoidReceiptBut_Click(object sender, EventArgs e)
        {
            //only admin can void
            //when void add transaction by minusing points back to user account
            //if status is processed.
            //else
            //just change status to void.
            int redemptionbypointreceiptid = int.Parse(UpdateReceiptBut.CommandArgument);
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                bool approveRedemptionByPointReceipt = ClientManager.voidRedemptionByPointReceipt(
                    redemptionbypointreceiptid,
                    int.Parse(ResellerDDL2.SelectedValue),
                    InvoiceNoTB.Text.Trim(),
                    (DateTime)PurchaseDateRadDatePicker.SelectedDate);
                RedemptionByPointReceipt redemptionByPointReceipt = ClientManager.getRedemptionByPointReceipt(redemptionbypointreceiptid);
                RedemptionMemberClient   redemptionMemberClient   = ClientManager.getRedemptionMemberClient(
                    redemptionByPointReceipt.UserId,
                    redemptionByPointReceipt.clientid);
                int    newPointBalance = redemptionMemberClient.pointbalance - redemptionByPointReceipt.totalpoints;
                string notes           = "Receipt ID:" + redemptionByPointReceipt.redemptionbypointreceiptid +
                                         " | Points:" + -redemptionByPointReceipt.totalpoints;

                int insertRedemptionByPointTransaction = ClientManager.insertRedemptionByPointTransaction(
                    redemptionByPointReceipt.UserId,
                    redemptionByPointReceipt.clientid,
                    (int)RedemptionByPointTransactionType.VOID,
                    -redemptionByPointReceipt.totalpoints,
                    newPointBalance,
                    notes);
                bool updateRedemptionMemberClientBalance = ClientManager.updateRedemptionMemberClientBalance(
                    redemptionByPointReceipt.UserId,
                    redemptionByPointReceipt.clientid,
                    newPointBalance);

                if ((insertRedemptionByPointTransaction != -1) &&
                    updateRedemptionMemberClientBalance)
                {
                    scope.Complete();
                }
                var x = ClientManager.getAllRedemptionByPointReceiptPendingProcess();
                ReceiptRadGrid.DataSource = x;
                ReceiptRadGrid.Rebind();
                ClientDetailPnl.Visible = false;

                Logger.LogInfo(Membership.GetUser().UserName + "- Void status is set for Receipt ID(ClaimPoints):" + redemptionbypointreceiptid
                               + " points are removed from member"
                               , this.GetType());
            }
        }
Ejemplo n.º 4
0
        protected void DeleteBut_Click(object sender, EventArgs e)
        {
            int redemptionrewardid = int.Parse(UpdateRedemptionBut.CommandArgument);
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                ApplicationServices.RedemptionReward redemptionReward = ClientManager.getRedemptionReward(redemptionrewardid);

                int rewardid = redemptionReward.rewardid;
                var redemptionMemberClient = ClientManager.getRedemptionMemberClient(
                    redemptionReward.UserId, redemptionReward.clientid);

                //add stock back to reward balance
                ClientManager.increaseRewardQtyBy1(rewardid);

                //if by points
                if (redemptionReward.type == (int)PromotionType.BY_POINT)
                {
                    int newPointBalance = redemptionMemberClient.pointbalance + redemptionReward.rewardpoints;

                    //return points
                    ClientManager.updateRedemptionMemberClientBalance(redemptionReward.UserId,
                                                                      redemptionReward.clientid,
                                                                      newPointBalance);
                    string notes = "VOID | Redemption ID:" + redemptionReward.redemptionrewardid + " | Points:" + redemptionReward.rewardpoints;
                    //add void transaction
                    ClientManager.insertRedemptionByPointTransaction(
                        redemptionReward.UserId,
                        redemptionReward.clientid,
                        (int)RedemptionByPointTransactionType.DEBIT,
                        redemptionReward.rewardpoints,
                        newPointBalance,
                        notes);
                }

                ClientManager.deleteRedemptionReward(
                    redemptionrewardid);
                ClientDetailPnl.Visible = false;

                scope.Complete();
                Logger.LogInfo(Membership.GetUser().UserName + "- deleted and return stock for Redemption ID:" + redemptionrewardid
                               , this.GetType());
            }

            RedemptionRewardRadGrid.Rebind();
        }
Ejemplo n.º 5
0
        protected void RejectReceiptBut_Click(object sender, EventArgs e)
        {
            int redemptionbypointreceiptid = int.Parse(UpdateReceiptBut.CommandArgument);
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                bool approveRedemptionByPointReceipt = ClientManager.rejectRedemptionByPointReceipt(
                    redemptionbypointreceiptid);
                scope.Complete();
                var x = ClientManager.getAllRedemptionByPointReceiptPendingProcess();
                ReceiptRadGrid.DataSource = x;
                ReceiptRadGrid.Rebind();
                ClientDetailPnl.Visible = false;

                Logger.LogInfo(Membership.GetUser().UserName + "- Reject status is set for Receipt ID(ClaimPoints):" + redemptionbypointreceiptid
                               , this.GetType());
            }
        }
Ejemplo n.º 6
0
        protected void DuplicateReceiptBut_Click(object sender, EventArgs e)
        {
            int redemptionbyproductreceiptid = int.Parse(UpdateReceiptBut.CommandArgument);
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                bool approveRedemptionByPointReceipt = ClientManager.duplicateRedemptionByProductReceipt(
                    redemptionbyproductreceiptid);
                scope.Complete();
                ReceiptRadGrid.Rebind();
                ClientDetailPnl.Visible          = false;
                RedemptionDetailsEditPnl.Visible = false;
                RedemptionDetailsPnl.Visible     = false;

                Logger.LogInfo(Membership.GetUser().UserName + "- Duplicate status is set for Receipt ID(ByProduct):" + approveRedemptionByPointReceipt
                               , this.GetType());
            }
        }
Ejemplo n.º 7
0
        protected void UpdateReceiptBut_Click(object sender, EventArgs e)
        {
            Page.Validate("form");
            if (Page.IsValid)
            {
                int redemptionbypointreceiptid = int.Parse(UpdateReceiptBut.CommandArgument);
                var db = new ApplicationServices.ApplicationServicesDB();
                using (var scope = db.GetTransaction())
                {
                    bool approveRedemptionByPointReceipt = ClientManager.approveRedemptionByPointReceipt(
                        redemptionbypointreceiptid,
                        int.Parse(ResellerDDL2.SelectedValue),
                        InvoiceNoTB.Text.Trim(),
                        (DateTime)PurchaseDateRadDatePicker.SelectedDate);
                    //textbox is filled so take balance from custom points tb
                    if (CustomPointsTB.Text.Trim().Count() > 0)
                    {
                        ClientManager.updateRedemptionByPointReceiptPoint(
                            redemptionbypointreceiptid,
                            int.Parse(CustomPointsTB.Text));
                    }

                    RedemptionByPointReceipt redemptionByPointReceipt = ClientManager.getRedemptionByPointReceipt(redemptionbypointreceiptid);
                    RedemptionMemberClient   redemptionMemberClient   = ClientManager.getRedemptionMemberClient(
                        redemptionByPointReceipt.UserId,
                        redemptionByPointReceipt.clientid);


                    int newPointBalance = redemptionMemberClient.pointbalance + redemptionByPointReceipt.totalpoints;
                    //RedemptionByPointTransaction
                    string notes = "Receipt ID:" + redemptionByPointReceipt.redemptionbypointreceiptid +
                                   " | Points:" + redemptionByPointReceipt.totalpoints;
                    int insertRedemptionByPointTransaction = ClientManager.insertRedemptionByPointTransaction(
                        redemptionByPointReceipt.UserId,
                        redemptionByPointReceipt.clientid,
                        (int)RedemptionByPointTransactionType.DEBIT,
                        redemptionByPointReceipt.totalpoints,
                        newPointBalance,
                        notes);
                    bool updateRedemptionMemberClientBalance = ClientManager.updateRedemptionMemberClientBalance(
                        redemptionByPointReceipt.UserId,
                        redemptionByPointReceipt.clientid,
                        newPointBalance);

                    /*
                     * MembershipUser membershipUser = Membership.GetUser(redemptionByPointReceipt.UserId);
                     * Hashtable values = new Hashtable();
                     * values.Add("[/logo/]", Config.EmailLogoUrl);
                     * var redemptionMember = ClientManager.getRedemptionMember(redemptionByPointReceipt.UserId);
                     * bool canSendEmail = EmailManager.SendClaimPointApprovalMail(
                     *                        membershipUser.Email,
                     *                        redemptionMember.firstname,
                     *                        values);
                     */
                    if (approveRedemptionByPointReceipt &&
                        (insertRedemptionByPointTransaction != -1) &&
                        updateRedemptionMemberClientBalance)
                    {
                        scope.Complete();
                    }
                }

                //reload radgrid
                var x = ClientManager.getAllRedemptionByPointReceiptPendingProcess();
                ReceiptRadGrid.DataSource = x;
                ReceiptRadGrid.Rebind();
                ClientDetailPnl.Visible = false;

                Logger.LogInfo(Membership.GetUser().UserName + "- Processed status is set and points assigned for Receipt ID(ClaimPoints):" + redemptionbypointreceiptid
                               , this.GetType());
            }
        }
Ejemplo n.º 8
0
        protected void ReeemBut_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["rewardid"] != null && Request.QueryString["promotionid"] != null)
            {
                var db = new ApplicationServices.ApplicationServicesDB();
                using (var scope = db.GetTransaction())
                {
                    int rewardid    = int.Parse(Request.QueryString["rewardid"]);
                    int promotionid = int.Parse(Request.QueryString["promotionid"]);

                    var redemptionMemberClient = ClientManager.getRedemptionMemberClient(
                        (Guid)Membership.GetUser().ProviderUserKey, Config.ClientId);

                    var reward          = ClientManager.getReward(rewardid);
                    var promotion       = ClientManager.getPromotion(promotionid);
                    int newPointBalance = redemptionMemberClient.pointbalance - reward.points;

                    //check before transaction
                    if (newPointBalance >= 0)
                    {
                        int redemptionRewardState = -1;
                        switch (int.Parse(CollectionModeRBL.SelectedValue))
                        {
                        case (int)CollectionMode.PICK_UP:
                            redemptionRewardState = (int)RedemptionRewardState.PENDING_COLLECTION;
                            break;

                        case (int)CollectionMode.DELIVERY:
                            redemptionRewardState = (int)RedemptionRewardState.PENDING_DELIVERY;
                            break;
                        }

                        //insert redemptinoreward item
                        int redemptionrewardid = ClientManager.insertRedemptionReward(
                            Config.ClientId, (Guid)Membership.GetUser().ProviderUserKey,
                            promotion.promotionid, promotion.name,
                            -1, "",
                            reward.rewardid, reward.name, reward.points,
                            int.Parse(CollectionModeRBL.SelectedValue), "", RemarksTB.Text.Trim(),
                            (int)PromotionType.BY_POINT, redemptionRewardState, -1);

                        //reduce qty of reward by 1
                        ClientManager.reduceRewardQtyBy1(reward.rewardid);

                        //add entry to point transactino
                        string notes = "Redemption ID:" + redemptionrewardid +
                                       " | Points:" + reward.points;
                        int RedemptionByPointTransactionid = ClientManager.insertRedemptionByPointTransaction(
                            (Guid)Membership.GetUser().ProviderUserKey,
                            Config.ClientId,
                            (int)RedemptionByPointTransactionType.REDEMPTION,
                            reward.points,
                            newPointBalance,
                            notes);

                        //update redemptionreward the redemption id
                        ClientManager.updateRedemptionRewardTransactionId(
                            redemptionrewardid, RedemptionByPointTransactionid);


                        //update redemptionmember point balance
                        ClientManager.updateRedemptionMemberClientBalance(
                            (Guid)Membership.GetUser().ProviderUserKey,
                            Config.ClientId,
                            newPointBalance);

                        scope.Complete();
                        //send email
                        bool             canSendEmail;
                        RedemptionMember redemptionMember = ClientManager.getRedemptionMember((Guid)Membership.GetUser().ProviderUserKey);

                        Client    client       = ClientManager.getClient(Config.ClientId);
                        string    emailLogoUrl = Config.SiteRootUrl + client.logoimagename;
                        Hashtable values       = new Hashtable();
                        values.Add("[/logo/]", emailLogoUrl);
                        values.Add("[/SubmissionDate/]", DateTime.Now.ToString("dd/MM/yyyy"));
                        values.Add("[/RedemptionNo/]", redemptionrewardid);
                        values.Add("[/ApprovedBy/]", "System");
                        values.Add("[/MemberName/]", redemptionMember.firstname + " " + redemptionMember.lastname);
                        values.Add("[/NRICNo/]", redemptionMember.NRIC);
                        values.Add("[/ContactNo/]", redemptionMember.contactno);
                        values.Add("[/DeliveryAddress/]", redemptionMember.mailingaddress + ", Singapore " + redemptionMember.postalcode);
                        values.Add("[/PointsDeducted/]", reward.points);
                        values.Add("[/BalancePoints/]", newPointBalance);
                        values.Add("[/RedemptionItem/s/]", reward.name);
                        values.Add("[/OutstandingQuantity/]", "1");
                        switch (int.Parse(CollectionModeRBL.SelectedValue))
                        {
                        case (int)CollectionMode.PICK_UP:
                            canSendEmail = EmailManager.SendRedemptionByPointsSelfCollectMail(
                                Membership.GetUser().Email,
                                redemptionMember.firstname,
                                values, this.Response);

                            break;

                        case (int)CollectionMode.DELIVERY:
                            canSendEmail = EmailManager.SendRedemptionByPointsDeliveryMail(
                                Membership.GetUser().Email,
                                redemptionMember.firstname,
                                values, this.Response);
                            break;
                        }

                        Response.Redirect("RedeemByPointsAck.aspx");
                    }
                    else
                    {
                        //not enough points
                    }
                }
            }
        }
Ejemplo n.º 9
0
        protected void AddItemBut_Click(object sender, EventArgs e)
        {
            int redemptionbyproductreceiptid = int.Parse(AddItemBut.CommandArgument);
            //******** wrap this in a transaction!!
            var db = new ApplicationServices.ApplicationServicesDB();

            using (var scope = db.GetTransaction())
            {
                try
                {       // RedemptionData.ClientManager.Product2 ss = (RedemptionData.ClientManager.Product2)ProductDDL2.SelectedItem.DataItem;
                    string   temp    = ProductDDL2.SelectedValue;
                    string[] idArray = temp.Split('|');
                    //  Response.Write("<br>1:" );


                    //   Response.Write("<br>2redemptionbyproductreceiptid:" + redemptionbyproductreceiptid);
                    //  int productid = int.Parse(ProductDDL.SelectedValue);
                    int productid = int.Parse(idArray[0]);
                    int rewardid  = int.Parse(idArray[1]);
                    //   Response.Write("<br>3:" + productid);
                    var product = ClientManager.getProduct(productid);
                    //   Response.Write("<br>4:" + product.productid);
                    var redemptionByProductReceipt = ClientManager.getRedemptionByProductReceipt(redemptionbyproductreceiptid);
                    //   Response.Write("<br>redemptionbyproductreceiptid:" + redemptionbyproductreceiptid);
                    //var promotionByProductProductReward = ClientManager.getPromotionByProductProductRewardByPromotionIdProductId(redemptionByProductReceipt.promotionid, productid);
                    //   Response.Write("<br>redemptionbyproductreceiptid:" + redemptionbyproductreceiptid);
                    var reward = ClientManager.getReward(rewardid);
                    //Response.Write("<br>redemptionbyproductreceiptid:" + redemptionbyproductreceiptid);
                    //Response.Write("<br>productid:" + productid);
                    //Response.Write("<br>product:" + product.productid);
                    //Response.Write("<br>redemptionByProductReceipt:" + redemptionByProductReceipt.redemptionbyproductreceiptid);
                    ////Response.Write("<br>promotionByProductProductReward:" + promotionByProductProductReward.productid);
                    //Response.Write("<br>redemptionByProductReceipt:" + redemptionByProductReceipt.redemptionbyproductreceiptid);
                    //Response.Write("<br>reward:" + reward.rewardid);
                    //Response.Write("<br>serialnoTB.Text.Trim():" + serialnoTB.Text.Trim());
                    //Response.Write("<br>redemptionByProductReceipt.remarks:" + redemptionByProductReceipt.remarks);
                    bool enoughstock = ClientManager.canReduceRewardQtyBy1(reward.rewardid);
                    if (enoughstock)
                    {
                        int status;

                        if (redemptionByProductReceipt.modeofcollection == (int)CollectionMode.DELIVERY)
                        {
                            status = (int)RedemptionRewardState.ARRANGING_DELIVERY;
                        }
                        else
                        {
                            status = (int)RedemptionRewardState.PENDING_COLLECTION;
                        }

                        int redemptionRewardid = ClientManager.insertRedemptionReward(
                            redemptionByProductReceipt.clientid, redemptionByProductReceipt.UserId,
                            redemptionByProductReceipt.promotionid,
                            redemptionByProductReceipt.promotionname,
                            product.productid, product.name,
                            reward.rewardid, reward.name, 0,
                            redemptionByProductReceipt.modeofcollection,
                            serialnoTB.Text.Trim(), redemptionByProductReceipt.remarks,
                            (int)PromotionType.BY_PRODUCT, status,
                            redemptionbyproductreceiptid);

                        //reduce the reward qty by 1
                        ClientManager.reduceRewardQtyBy1(reward.rewardid);
                        AddItemErrorLit.Text = "";

                        Logger.LogInfo(Membership.GetUser().UserName + "- added Redemption Receipt ID(ByProduct):" + redemptionbyproductreceiptid
                                       , this.GetType());
                    }
                    else
                    {
                        AddItemErrorLit.Text = "Cannot add redemption. Not enough stock for this reward.";
                    }
                    scope.Complete();
                }
                catch (Exception ee)
                {
                }
                var x = ClientManager.getAllRedemptionRewardsByReceiptId(redemptionbyproductreceiptid);
                RedemptionRewardRadGrid.DataSource = x;
                RedemptionRewardRadGrid.Rebind();
            }

            /*      int redemptionbypointreceiptid = int.Parse(AddItemBut.CommandArgument);
             *    int productid = int.Parse(ProductDDL.SelectedValue);
             *    var product = ClientManager.getProduct(productid);
             *    ClientManager.insertRedemptionByPointReceiptItem(
             *    redemptionbypointreceiptid,
             *         productid,
             *         serialnoTB.Text.Trim(),
             *         product.points,
             *         product.model);
             *
             *    //reload item grid
             *    var x = ClientManager.getAllRedemptionByPointReceiptReceiptId(redemptionbypointreceiptid);
             *    ReceiptItemRadGrid.DataSource = x;
             *    ReceiptItemRadGrid.Rebind();
             *
             *    //reset fields for add
             *    ProductDDL.SelectedIndex = 0;
             *    serialnoTB.Text = "";
             *
             *    //update receipt
             *    //get For each
             *
             *
             *    List<RedemptionByPointReceiptItem> list = (List<RedemptionByPointReceiptItem>)x;
             *    int total = 0;
             *    foreach (RedemptionByPointReceiptItem item in list)
             *    {
             *        total += item.productpoints;
             *    }
             *    totalpointsLit.Text = total.ToString();
             *    ClientManager.updateRedemptionByPointReceiptPoint(redemptionbypointreceiptid, total);
             */
        }