Beispiel #1
0
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj    = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PREM7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this from from frmReminderPopUp form to view details
 /// </summary>
 /// <param name="frmReminderPopup"></param>
 public void CallFromReminder(frmReminderPopUp frmReminderPopup)
 {
     try
     {
         base.Show();
         frmReminderPopupObj = frmReminderPopup;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("ODPO:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj    = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PREM7:" + ex.Message;
     }
 }
Beispiel #4
0
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmreminder"></param>
 public void CallFromReminder(frmReminderPopUp frmreminder)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj    = frmreminder;
         frmReminderPopupObj.Enabled = false;
         OverDueSalesOrderGridFill();
     }
     catch (Exception ex)
     {
         MessageBox.Show("ODSO3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmreminder"></param>
 public void CallFromReminder(frmReminderPopUp frmreminder)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj = frmreminder;
         frmReminderPopupObj.Enabled = false;
         OverDueSalesOrderGridFill();
     }
     catch (Exception ex)
     {
         MessageBox.Show("ODSO3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmreminder"></param>
 public void CallFromReminder(frmReminderPopUp frmreminder)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj    = frmreminder;
         frmReminderPopupObj.Enabled = false;
         OverDueSalesOrderGridFill();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ODSO3:" + ex.Message;
     }
 }
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 /// <param name="isFromreorderLevel"></param>
 public void CallFromReorderStockReminder(frmReminderPopUp frmReminder, bool isFromreorderLevel)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj    = frmReminder;
         frmReminderPopupObj.Enabled = false;
         rbtnReorder.Checked         = true;
         btnSearch.PerformClick();
     }
     catch (Exception ex)
     {
         MessageBox.Show("ST:15" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #8
0
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 /// <param name="isFromreorderLevel"></param>
 public void CallFromReorderStockReminder(frmReminderPopUp frmReminder, bool isFromreorderLevel)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj = frmReminder;
         frmReminderPopupObj.Enabled = false;
         rbtnReorder.Checked = true;
         btnSearch.PerformClick();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "ST:15" + ex.Message;
     }
 }
Beispiel #9
0
 /// <summary>
 /// Function to call this form frmReminderPopUp form to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     try
     {
         base.Show();
         DataTable dtbl = new DataTable();
         dtbl = new ReminderSP().ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
         dgvProductExpiry.DataSource = dtbl;
         this.frmReminderPopupObj    = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SE:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #10
0
 /// <summary>
 /// Function to call this form frmReminderPopUp form to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     try
     {
         base.Show();
         DataTable dtbl = new DataTable();
         dtbl = new ReminderSP().ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
         dgvProductExpiry.DataSource = dtbl;
         this.frmReminderPopupObj    = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "SE:11" + ex.Message;
     }
 }
        /// <summary>
        /// Function to call this form frmReminderPopUp form to view details
        /// </summary>
        /// <param name="frmReminder"></param>
        public void CallFromReminder(frmReminderPopUp frmReminder)
        {
            RemainderBll bllRemainder = new RemainderBll();

            try
            {
                base.Show();
                List <DataTable> list = new List <DataTable>();
                list = bllRemainder.ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
                dgvProductExpiry.DataSource = list;
                this.frmReminderPopupObj    = frmReminder;
                frmReminderPopupObj.Enabled = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show("SE:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to call this form frmReminderPopUp form to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     RemainderBll bllRemainder = new RemainderBll();
     try
     {
         base.Show();
         List<DataTable> list = new List<DataTable>();
         list = bllRemainder.ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
         dgvProductExpiry.DataSource = list;
         this.frmReminderPopupObj = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SE:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #13
0
        /// <summary>
        /// Showing Reminder If Any one have
        /// </summary>
        public void ShowReminderIfAny()
        {
            try
            {
                string           Purchasereminder    = string.Empty;
                string           Salesreminder       = string.Empty;
                string           Personalreminder    = string.Empty;
                string           NegativeStkreminder = string.Empty;
                string           MinStkreminder      = string.Empty;
                string           MaxStkreminder      = string.Empty;
                string           ReordrStkreminder   = string.Empty;
                string           ShortExpiryReminder = string.Empty;
                List <DataTable> ListObj             = new List <DataTable>();
                PurchaseOrderBll BllPurchaseOrder    = new PurchaseOrderBll();
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverduePurchaseOrder", "View"))
                {
                    ListObj = BllPurchaseOrder.PurchaseOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            Purchasereminder = Purchasereminder + "1 Overdue purchase order\n\n";
                        }
                        else
                        {
                            Purchasereminder = Purchasereminder + ListObj[0].Rows.Count + " Overdue purchase orders\n\n";
                        }
                    }
                }
                SalesOrderBll bllSalesOrder = new SalesOrderBll();
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverdueSalesOrder", "View"))
                {
                    ListObj = bllSalesOrder.SalesOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            Salesreminder = Salesreminder + "1 Overdue sales order\n\n";
                        }
                        else
                        {
                            Salesreminder = Salesreminder + ListObj[0].Rows.Count + " Overdue sales orders\n\n";
                        }
                    }
                }
                RemainderBll bllRemainder = new RemainderBll();
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Delete") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Update") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Save"))
                {
                    string FromDate = Convert.ToString(PublicVariables._dtCurrentDate);
                    string ToDate   = Convert.ToString(PublicVariables._dtCurrentDate);
                    ListObj = bllRemainder.ReminderSearch(FromDate, ToDate);
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            Personalreminder = Personalreminder + "1 personal reminder \n\n";
                        }
                        else
                        {
                            Personalreminder = Personalreminder + ListObj[0].Rows.Count + " Personal reminders\n\n";
                        }
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmShortExpiry", "View"))
                {
                    ListObj = bllRemainder.ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            ShortExpiryReminder = ShortExpiryReminder + "1 Product batch is going to expire";
                        }
                        else
                        {
                            ShortExpiryReminder = ShortExpiryReminder + ListObj[0].Rows.Count + " Product batches going to expire";
                        }
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStock", "View"))
                {
                    ListObj = bllRemainder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Negative Stock");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            NegativeStkreminder = NegativeStkreminder + "1 Negative stock product \n\n";
                        }
                        else
                        {
                            NegativeStkreminder = NegativeStkreminder + ListObj[0].Rows.Count + " Negative stock products\n\n";
                        }
                    }

                    ListObj = bllRemainder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Minimum Level");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            MinStkreminder = MinStkreminder + "1 Minimum stock product \n\n";
                        }
                        else
                        {
                            MinStkreminder = MinStkreminder + ListObj[0].Rows.Count + "  Minimum stock products \n\n";
                        }
                    }
                    ListObj = bllRemainder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Maximum Level");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            MaxStkreminder = MaxStkreminder + "1 Maximum stock product \n\n";
                        }
                        else
                        {
                            MaxStkreminder = MaxStkreminder + ListObj[0].Rows.Count + "  Maximum stock products \n\n";
                        }
                    }
                    ListObj = bllRemainder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Reorder Level");
                    if (ListObj[0].Rows.Count > 0)
                    {
                        if (ListObj[0].Rows.Count == 1)
                        {
                            ReordrStkreminder = ReordrStkreminder + "1 Reorder Level product \n\n";
                        }
                        else
                        {
                            ReordrStkreminder = ReordrStkreminder + ListObj[0].Rows.Count + "  Reorder Level products \n\n";
                        }
                    }
                }
                if (Salesreminder.Trim() != string.Empty || Purchasereminder.Trim() != string.Empty || Personalreminder.Trim() != string.Empty || NegativeStkreminder.Trim() != string.Empty || MinStkreminder.Trim() != string.Empty || MaxStkreminder.Trim() != string.Empty || ReordrStkreminder.Trim() != string.Empty)
                {
                    frmReminderPopUp frmReminder = new frmReminderPopUp();
                    frmReminderPopUp isOpen      = Application.OpenForms["frmReminderPopUp"] as frmReminderPopUp;
                    if (isOpen == null)
                    {
                        frmReminder.WindowState = FormWindowState.Normal;
                        frmReminder.MdiParent   = formMDI.MDIObj;
                        frmReminder.BringToFront();
                        frmReminder.ChangeLabel(Salesreminder, Purchasereminder, Personalreminder, ShortExpiryReminder, NegativeStkreminder, MinStkreminder, MaxStkreminder, ReordrStkreminder);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CCD : 13 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #14
0
        /// <summary>
        /// Showing Reminder If Any one have
        /// </summary>
        public void ShowReminderIfAny()
        {
            try
            {
                string     Purchasereminder    = string.Empty;
                string     Salesreminder       = string.Empty;
                string     Personalreminder    = string.Empty;
                string     NegativeStkreminder = string.Empty;
                string     MinStkreminder      = string.Empty;
                string     MaxStkreminder      = string.Empty;
                string     ReordrStkreminder   = string.Empty;
                string     ShortExpiryReminder = string.Empty;
                DataTable  dtbl       = new DataTable();
                ReminderSP SpReminder = new ReminderSP();
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverduePurchaseOrder", "View"))
                {
                    PurchaseOrderMasterSP SpPurchaseOrderMaster = new PurchaseOrderMasterSP();
                    dtbl = SpPurchaseOrderMaster.PurchaseOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            Purchasereminder = Purchasereminder + "1 Overdue purchase order\n\n";
                        }
                        else
                        {
                            Purchasereminder = Purchasereminder + dtbl.Rows.Count + " Overdue purchase orders\n\n";
                        }
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverdueSalesOrder", "View"))
                {
                    SalesOrderMasterSP SpSalesOrderMaster = new SalesOrderMasterSP();
                    dtbl = SpSalesOrderMaster.SalesOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            Salesreminder = Salesreminder + "1 Overdue sales order\n\n";
                        }
                        else
                        {
                            Salesreminder = Salesreminder + dtbl.Rows.Count + " Overdue sales orders\n\n";
                        }
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Delete") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Update") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Save"))
                {
                    string FromDate = Convert.ToString(PublicVariables._dtCurrentDate);
                    string ToDate   = Convert.ToString(PublicVariables._dtCurrentDate);
                    dtbl = SpReminder.ReminderSearch(FromDate, ToDate);
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            Personalreminder = Personalreminder + "1 personal reminder \n\n";
                        }
                        else
                        {
                            Personalreminder = Personalreminder + dtbl.Rows.Count + " Personal reminders\n\n";
                        }
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmShortExpiry", "View"))
                {
                    dtbl = SpReminder.ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            ShortExpiryReminder = ShortExpiryReminder + "1 Product batch is going to expire";
                        }
                        else
                        {
                            ShortExpiryReminder = ShortExpiryReminder + dtbl.Rows.Count + " Product batches going to expire";
                        }
                    }
                }
                //frmStock
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStock", "View"))
                {
                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Negative Stock");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            NegativeStkreminder = NegativeStkreminder + "1 Negative stock product \n\n";
                        }
                        else
                        {
                            NegativeStkreminder = NegativeStkreminder + dtbl.Rows.Count + " Negative stock products\n\n";
                        }
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Minimum Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            MinStkreminder = MinStkreminder + "1 Minimum stock product \n\n";
                        }
                        else
                        {
                            MinStkreminder = MinStkreminder + dtbl.Rows.Count + "  Minimum stock products \n\n";
                        }
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Maximum Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            MaxStkreminder = MaxStkreminder + "1 Maximum stock product \n\n";
                        }
                        else
                        {
                            MaxStkreminder = MaxStkreminder + dtbl.Rows.Count + "  Maximum stock products \n\n";
                        }
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Reorder Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                        {
                            ReordrStkreminder = ReordrStkreminder + "1 Reorder Level product \n\n";
                        }
                        else
                        {
                            ReordrStkreminder = ReordrStkreminder + dtbl.Rows.Count + "  Reorder Level products \n\n";
                        }
                    }
                }
                if (Salesreminder.Trim() != string.Empty || Purchasereminder.Trim() != string.Empty || Personalreminder.Trim() != string.Empty || NegativeStkreminder.Trim() != string.Empty || MinStkreminder.Trim() != string.Empty || MaxStkreminder.Trim() != string.Empty || ReordrStkreminder.Trim() != string.Empty)
                {
                    frmReminderPopUp frmReminder = new frmReminderPopUp();
                    frmReminderPopUp isOpen      = Application.OpenForms["frmReminderPopUp"] as frmReminderPopUp;
                    if (isOpen == null)
                    {
                        frmReminder.WindowState = FormWindowState.Normal;
                        frmReminder.MdiParent   = formMDI.MDIObj;
                        frmReminder.BringToFront();
                        frmReminder.ChangeLabel(Salesreminder, Purchasereminder, Personalreminder, ShortExpiryReminder, NegativeStkreminder, MinStkreminder, MaxStkreminder, ReordrStkreminder);
                    }
                }
            }
            catch (Exception ex)
            {
                formMDI.infoError.ErrorString = "CCD 13: " + ex.Message;
            }
        }
        /// <summary>
        /// Showing Reminder If Any one have
        /// </summary>
        public void ShowReminderIfAny()
        {
            try
            {
                string Purchasereminder = string.Empty;
                string Salesreminder = string.Empty;
                string Personalreminder = string.Empty;
                string NegativeStkreminder = string.Empty;
                string MinStkreminder = string.Empty;
                string MaxStkreminder = string.Empty;
                string ReordrStkreminder = string.Empty;
                string ShortExpiryReminder = string.Empty;
                DataTable dtbl = new DataTable();
                ReminderSP SpReminder = new ReminderSP();
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverduePurchaseOrder", "View"))
                {
                    PurchaseOrderMasterSP SpPurchaseOrderMaster = new PurchaseOrderMasterSP();
                    dtbl = SpPurchaseOrderMaster.PurchaseOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            Purchasereminder = Purchasereminder + "1 Overdue purchase order\n\n";
                        else
                            Purchasereminder = Purchasereminder + dtbl.Rows.Count + " Overdue purchase orders\n\n";
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmOverdueSalesOrder", "View"))
                {
                    SalesOrderMasterSP SpSalesOrderMaster = new SalesOrderMasterSP();
                    dtbl = SpSalesOrderMaster.SalesOrderOverDueReminder(PublicVariables._dtFromDate, PublicVariables._dtToDate, "Due", PublicVariables._dtCurrentDate, "All");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            Salesreminder = Salesreminder + "1 Overdue sales order\n\n";
                        else
                            Salesreminder = Salesreminder + dtbl.Rows.Count + " Overdue sales orders\n\n";
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Delete") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Update") ||
                    CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmPersonalReminder", "Save"))
                {
                    string FromDate = Convert.ToString(PublicVariables._dtCurrentDate);
                    string ToDate = Convert.ToString(PublicVariables._dtCurrentDate);
                    dtbl = SpReminder.ReminderSearch(FromDate, ToDate);
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            Personalreminder = Personalreminder + "1 personal reminder \n\n";
                        else
                            Personalreminder = Personalreminder + dtbl.Rows.Count + " Personal reminders\n\n";
                    }
                }
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmShortExpiry", "View"))
                {
                    dtbl = SpReminder.ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            ShortExpiryReminder = ShortExpiryReminder + "1 Product batch is going to expire";
                        else
                            ShortExpiryReminder = ShortExpiryReminder + dtbl.Rows.Count + " Product batches going to expire";
                    }
                }
                //frmStock
                if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmStock", "View"))
                {
                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Negative Stock");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            NegativeStkreminder = NegativeStkreminder + "1 Negative stock product \n\n";
                        else
                            NegativeStkreminder = NegativeStkreminder + dtbl.Rows.Count + " Negative stock products\n\n";
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Minimum Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            MinStkreminder = MinStkreminder + "1 Minimum stock product \n\n";
                        else
                            MinStkreminder = MinStkreminder + dtbl.Rows.Count + "  Minimum stock products \n\n";
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Maximum Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            MaxStkreminder = MaxStkreminder + "1 Maximum stock product \n\n";
                        else
                            MaxStkreminder = MaxStkreminder + dtbl.Rows.Count + "  Maximum stock products \n\n";
                    }

                    dtbl = SpReminder.StockSearch(0, 0, 0, 0, 0, 0, 0, 0, "Reorder Level");
                    if (dtbl.Rows.Count > 0)
                    {
                        if (dtbl.Rows.Count == 1)
                            ReordrStkreminder = ReordrStkreminder + "1 Reorder Level product \n\n";
                        else
                            ReordrStkreminder = ReordrStkreminder + dtbl.Rows.Count + "  Reorder Level products \n\n";
                    }
                }
                if (Salesreminder.Trim() != string.Empty || Purchasereminder.Trim() != string.Empty || Personalreminder.Trim() != string.Empty || NegativeStkreminder.Trim() != string.Empty || MinStkreminder.Trim() != string.Empty || MaxStkreminder.Trim() != string.Empty || ReordrStkreminder.Trim() != string.Empty)
                {
                    frmReminderPopUp frmReminder = new frmReminderPopUp();
                    frmReminderPopUp isOpen = Application.OpenForms["frmReminderPopUp"] as frmReminderPopUp;
                    if (isOpen == null)
                    {
                        frmReminder.WindowState = FormWindowState.Normal;
                        frmReminder.MdiParent = formMDI.MDIObj;
                        frmReminder.BringToFront();
                        frmReminder.ChangeLabel(Salesreminder, Purchasereminder, Personalreminder, ShortExpiryReminder, NegativeStkreminder, MinStkreminder, MaxStkreminder, ReordrStkreminder);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CCD : 13 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 /// <summary>
 /// Function to call this form from frmReminderPopUp to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 /// <param name="isFromMaxStock"></param>
 public void CallFromMaxStockReminder(frmReminderPopUp frmReminder, bool isFromMaxStock)
 {
     try
     {
         base.Show();
         this.frmReminderPopupObj = frmReminder;
         frmReminderPopupObj.Enabled = false;
         rbtnMax.Checked = true;
         btnSearch.PerformClick();
     }
     catch (Exception ex)
     {
         MessageBox.Show("ST:14" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #17
0
 /// <summary>
 /// Function to call this form frmReminderPopUp form to view details
 /// </summary>
 /// <param name="frmReminder"></param>
 public void CallFromReminder(frmReminderPopUp frmReminder)
 {
     try
     {
         base.Show();
         DataTable dtbl = new DataTable();
         dtbl = new ReminderSP().ShortExpiryReminder(0, 0, 0, 0, 0, 0, 0, 0);
         dgvProductExpiry.DataSource = dtbl;
         this.frmReminderPopupObj = frmReminder;
         frmReminderPopupObj.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SE:11" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }