public ActionResult ReverseRecord(GLInitialRepo GLRepo)
        {
            try
            {
                if (GLRepo.TID < 1)
                {
                    X.Mask.Hide();
                    X.Msg.Show(new MessageBoxConfig
                    {
                        Title   = "Error",
                        Message = "Sorry! No Transaction has been selected for reversal.",
                        Buttons = MessageBox.Button.OK,
                        Icon    = MessageBox.Icon.ERROR,
                        Width   = 350
                    });
                    return(this.Direct());
                }

                //if (string.IsNullOrEmpty(GLRepo.Reversal_Reason))
                //{
                //    X.Mask.Hide();
                //    X.Msg.Show(new MessageBoxConfig
                //    {
                //        Title = "Error",
                //        Message = "Please enter reason for reversal.",
                //        Buttons = MessageBox.Button.OK,
                //        Icon = MessageBox.Icon.ERROR,
                //        Width = 350
                //    });
                //    return this.Direct();
                //}


                ///approve pending purchases
                GLRepo.Reverse_Initial(GLRepo);

                X.Msg.Show(new MessageBoxConfig
                {
                    Title   = "Success",
                    Message = "Initial GL Transaction Successfully Reversed.",
                    Buttons = MessageBox.Button.OK,
                    Icon    = MessageBox.Icon.INFO,
                    Width   = 350
                });
                ClearControls_Reversal();
                Store store = X.GetCmp <Store>("InitialReversal_Store");
                store.Reload();

                return(this.Direct());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public ActionResult ReverseRecord(GLInitialRepo GLRepo)
        {
            try
            {
                if (GLRepo.TID < 1)
                {
                    X.Mask.Hide();
                    X.Msg.Show(new MessageBoxConfig
                    {
                        Title   = "Error",
                        Message = "Sorry! No Transaction has been selected for reversal.",
                        Buttons = MessageBox.Button.OK,
                        Icon    = MessageBox.Icon.ERROR,
                        Width   = 350
                    });
                    return(this.Direct());
                }

                //if (string.IsNullOrEmpty(GLRepo.Reversal_Reason))
                //{
                //    X.Mask.Hide();
                //    X.Msg.Show(new MessageBoxConfig
                //    {
                //        Title = "Error",
                //        Message = "Please enter reason for reversal.",
                //        Buttons = MessageBox.Button.OK,
                //        Icon = MessageBox.Icon.ERROR,
                //        Width = 350
                //    });
                //    return this.Direct();
                //}


                ///approve pending purchases
                GLRepo.Reverse_Initial(GLRepo);

                X.Msg.Show(new MessageBoxConfig
                {
                    Title   = "Success",
                    Message = "Initial GL Transaction Successfully Reversed.",
                    Buttons = MessageBox.Button.OK,
                    Icon    = MessageBox.Icon.INFO,
                    Width   = 350
                });
                //ClearControls_Reversal();
                //Store store = X.GetCmp<Store>("InitialReversal_Store");
                //store.Reload();
                //return this.Direct();
                var pvr = new Ext.Net.MVC.PartialViewResult
                {
                    ViewName    = "GLInitialReversalPartial",
                    ContainerId = "MainArea",
                    RenderMode  = RenderMode.AddTo,
                };
                this.GetCmp <TabPanel>("MainArea").SetLastTabAsActive();
                return(pvr);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }