Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            defaultPage = (Page_Controls)Session["Permission"];
            if (Context.User.Identity.IsAuthenticated)
            {
                HttpContext.Current.GetOwinContext().Authentication.SignOut(
                    OpenIdConnectAuthenticationDefaults.AuthenticationType,
                    CookieAuthenticationDefaults.AuthenticationType);
            }

            if (Session["Permission"] != null)
            {
                string lstmsg = string.Empty;

                LstActivityTrack.AppFeature = "Logout";
                LstActivityTrack.UserID     = defaultPage.UserId;
                LstActivityTrack.FacilityID = defaultPage.FacilityID;
                LstActivityTrack.MachineID  = GetIPAddress.GetMachineAddress();
                LstActivityTrack.IPAddress  = GetIPAddress.GetDeviceAddress();


                lstmsg = lclsService.ActivityTracker(LstActivityTrack);
                Session["Permission"] = null;
            }
        }
Example #2
0
        public static Dictionary <string, object> BindCumulativebyItemCategory(string CorpID, string FacilityID, string VendorID, string CategoryID, Nullable <DateTime> Month, Nullable <DateTime> DateFrom, Nullable <DateTime> DateTo, string ItemID, string ortype)
        {
            try
            {
                InventoryServiceClient lclsservice = new InventoryServiceClient();
                Page_Controls          defaultPage = new Page_Controls();
                BALReport llstReport = new BALReport();
                string    Status     = string.Empty;
                llstReport.CorporateID    = CorpID;
                llstReport.FacilityID     = FacilityID;
                llstReport.VendorID       = VendorID;
                llstReport.ItemCategoryID = CategoryID;
                if (Convert.ToString(Month) != "")
                {
                    llstReport.DateFrom = Month;
                }
                else
                {
                    llstReport.DateFrom = DateFrom;
                }

                llstReport.DateTo = DateTo;
                if (ItemID != "")
                {
                    llstReport.ItemID = ItemID;
                }
                if (ortype != "0")
                {
                    llstReport.OrderType = ortype;
                }
                llstReport.LoggedInBy = Roleid;
                llstReport.Filter     = "";

                DataSet ds = new DataSet();
                ds = lclsservice.GetCumUsageReport(llstReport);

                DataTable dtColumns = new DataTable();
                dtColumns.Columns.Add("title");
                dtColumns.Columns.Add("data");
                DataRow drr = null;


                foreach (DataColumn dr in ds.Tables[0].Columns)
                {
                    dtColumns.NewRow();
                    dtColumns.Rows.Add(dr.ToString(), dr.ToString());
                }
                Dictionary <string, object> list = new Dictionary <string, object>();
                list["List01"] = GetDataTableDictionaryList(ds.Tables[0]);
                list["List02"] = GetDataTableDictionaryList(dtColumns);
                return(list);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                defaultPage = (Page_Controls)Session["Permission"];
                ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
                scriptManager.RegisterPostBackControl(this.btnprintsummary);
                scriptManager.RegisterPostBackControl(this.btnprintdetail);
                if (!IsPostBack)
                {
                    RequiredFieldValidatorMessage();
                    if (defaultPage != null)
                    {
                        BindItem();
                        LoadLookups("Add");
                        BindUnitPriceCurrency();
                        BindsearchCategory();
                        txtQty.Attributes.Add("onchange", "GetEachPrice();");
                        txtunitvalue.Attributes.Add("onchange", "GetEachPrice();");
                        rdsearcate.Checked     = true;
                        reactive.SelectedValue = "1";

                        if (defaultPage.MedicalSuppliesPage_Edit == false && defaultPage.MedicalSuppliesPage_View == true)
                        {
                            btnsave.Visible         = false;
                            btnAdd.Visible          = false;
                            btnprintsummary.Visible = true;
                            //btnSearchItems.Visible = true;
                        }

                        if (defaultPage.MedicalSuppliesPage_Edit == false && defaultPage.MedicalSuppliesPage_View == false)
                        {
                            div_ADDContent.Visible          = false;
                            UpdatePanel2.Visible            = false;
                            grditem.Visible                 = false;
                            btnsave.Visible                 = false;
                            User_Permission_Message.Visible = true;
                        }
                    }
                    else
                    {
                        Response.Redirect("Login.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                EventLogger log = new EventLogger(config);
                log.LogException(ex);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.MedicalSuppliesErrorMessage.Replace("<<Itemname>>", ex.Message), true);
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                defaultPage = (Page_Controls)Session["Permission"];
                ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
                scriptManager.RegisterPostBackControl(this.buttonPrint);
                if (!IsPostBack)
                {
                    RequiredFieldValidatorMessage();
                    //LoadLookups("Add");
                    BindFacility();
                    BindVendor();
                    BindGrid();
                    if (defaultPage != null)
                    {
                        if (defaultPage.VendorFacilityActPage_Edit == false && defaultPage.VendorFacilityActPage_View == true)
                        {
                            //SaveCancel.Visible = false;
                            btnsave.Visible = false;
                        }

                        if (defaultPage.VendorFacilityActPage_Edit == false && defaultPage.VendorFacilityActPage_View == false)
                        {
                            div_ADDContent.Visible        = false;
                            DivSearch.Visible             = false;
                            gridFacilityVendorAcc.Visible = false;
                            btnsave.Visible                 = false;
                            div_SearchDiv.Visible           = false;
                            savecancel.Visible              = false;
                            User_Permission_Message.Visible = true;
                        }
                    }
                    else
                    {
                        Response.Redirect("Login.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                EventLogger log = new EventLogger(config);
                log.LogException(ex);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.FacilityVendorAccountErrorMessage.Replace("<<FacilityDescription>>", ex.Message), true);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                defaultPage = (Page_Controls)Session["Permission"];
                ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
                scriptManager.RegisterPostBackControl(this.btnprint);
                if (!IsPostBack)
                {
                    RequiredFieldValidatorMessage();
                    bindgrid();
                    reactive.SelectedValue = "1";
                    if (defaultPage != null)
                    {
                        if (defaultPage.ItemCategoryPage_Edit == false && defaultPage.ItemCategoryPage_View == true)
                        {
                            btnadd.Visible    = false;
                            btnsave.Visible   = false;
                            btnsearch.Visible = true;
                            btnprint.Visible  = true;
                        }

                        if (defaultPage.ItemCategoryPage_Edit == false && defaultPage.ItemCategoryPage_View == false)
                        {
                            div_ADDContent.Visible          = false;
                            grdpgroup.Visible               = false;
                            btnsave.Visible                 = false;
                            updmain.Visible                 = false;
                            User_Permission_Message.Visible = true;
                        }
                    }
                    else
                    {
                        Response.Redirect("Login.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                EventLogger log = new EventLogger(config);
                log.LogException(ex);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.ItemCategoryErrorMessage.Replace("<<ItemCategory>>", ex.Message), true);
            }
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                defaultPage = (Page_Controls)Session["Permission"];
                ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
                if (!IsPostBack)
                {
                    if (defaultPage != null)
                    {
                        BindCorporate();
                        BindFacility();
                        BindVendor();
                        BindCategory();
                        BindItem();
                        BindScreen();
                        BindReport("Add");
                        Roleid = Convert.ToInt64(defaultPage.RoleID);
                        if (defaultPage.Reports_Edit == false && defaultPage.Reports_View == true)
                        {
                        }

                        if (defaultPage.Reports_Edit == false && defaultPage.Reports_View == false)
                        {
                            updmain.Visible = false;
                            User_Permission_Message.Visible = true;
                        }
                    }
                    else
                    {
                        Response.Redirect("Login.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.ReportErrorMessage.Replace("<<Report>>", ex.Message), true);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                defaultPage = (Page_Controls)Session["Permission"];
                ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
                scriptManager.RegisterPostBackControl(this.gvCorporate);
                scriptManager.RegisterPostBackControl(this.btnPrint);

                if (!IsPostBack)
                {
                    RequiredFieldValidatorMessage();
                    BindGrid();
                    if (defaultPage != null)
                    {
                        if (defaultPage.CorporatePage_View == false && defaultPage.CorporatePage_Edit == false)
                        {
                            updmain.Visible = false;
                            User_Permission_Message.Visible = true;
                        }
                        if (defaultPage.CorporatePage_Edit == false && defaultPage.CorporatePage_View == true)
                        {
                        }
                    }
                    else
                    {
                        Response.Redirect("Login.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                EventLogger log = new EventLogger(config);
                log.LogException(ex);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.CorporateErrorMessage.Replace("<<Corporate>>", ex.Message.ToString()), true);
            }
        }