Ejemplo n.º 1
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     ModalPopupEdit.Hide();
     ModalPopupAdd.Hide();
     ModalPopupDelete.Hide();
     ClearAdd();
 }
 protected void imgDelete_Click(object sender, EventArgs e)
 {
     if (ViewState["DDID"] != null)
     {
         ModalPopupDelete.Show();
     }
 }
Ejemplo n.º 3
0
        private void DeleteItem()
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                if (!string.IsNullOrEmpty(ViewState["Alert_ID"].ToString().Trim()))

                {
                    //AdminBLL ws = new AdminBLL();
                    //DeleteAlertRequest _req = new DeleteAlertRequest();

                    //_req.Alert_ID = ViewState["Alert_ID"].ToString().Trim();

                    //ws.DeleteAlert(_req);

                    string argId1 = ViewState["Alert_ID"].ToString().Trim();
                    dal.executesql("Delete From Alert_Handling Where Alert_ID='" + argId1 + "' ");
                    // HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "DELETE");
                    SpaMaster MyMasterPage = (SpaMaster)Page.Master;

                    MyMasterPage.ShowErrorMessage("Record Delete sucessfully ..!");
                    ModalPopupDelete.Hide();
                    ModalPopupDelete.Hide();
                    BindGridWithFilter();
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 4
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            string argitemid = hdnitmID.Value.ToString();

            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;
                if (!string.IsNullOrEmpty(argitemid))
                {
                    DataAccessLayer dal = new DataAccessLayer();
                    dal.executesql("delete from Shift_Master where shift_ID=" + argitemid);
                    BindGridTelerik();
                    ModalPopupDelete.Hide();
                    MyMasterPage.ShowErrorMessage("Record Deleted Successfully");
                    //  ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Deletd Submitted..!');", true);
                    //HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "DELETE");
                    //Server.Transfer("CompleteForm.aspx");
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 5
0
        protected void Deletepopup_Yes_Click(object sender, EventArgs e)
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                if (ViewState["Event_ID"] != null)
                {
                    DeleteItem(ViewState["Event_ID"].ToString());
                    //  ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Delete SuccessFully');", true);

                    SpaMaster MyMasterPage = (SpaMaster)Page.Master;

                    MyMasterPage.ShowErrorMessage("Record Deleted SuccessFully..!");



                    BindGridWithFilter();
                    ViewState["Event_ID"] = null;
                    ModalPopupDelete.Hide();
                }
            }
            catch (Exception ex)
            {
                logger.Info("AdminCappAsset(AssertImgUpdate_Click):" + ex.Message);
            }
        }
Ejemplo n.º 6
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;
                if (!string.IsNullOrEmpty(hdnitmID.Value.ToString()))
                {
                    AdminBLL ws = new AdminBLL();
                    DeleteInventoryRequest _req = new DeleteInventoryRequest();

                    _req.InventoryItemId = hdnitmID.Value.ToString();
                    ws.DeleteInventory(_req);
                    ModalPopupDelete.Hide();
                    BindGridTelerik();
                    MyMasterPage.ShowErrorMessage("Record Deleted Successfully..!");
                    // ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Deleted Successfully..!');", true);

                    //HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "DELETE");
                    //Server.Transfer("CompleteForm.aspx");
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 7
0
        //private void fillAlertType()
        //{
        //    ddlAlertType.Items.Clear();
        //    ddlAlertType.Items.Add(" ");
        //    string ID = "alerttype";
        //    SqlParameter[] para1 = new SqlParameter[1];
        //    para1[0] = new SqlParameter("@ID", ID);
        //    DataTable dt = dal.executeprocedure("sp_getLogvaluebyID", para1, true);

        //    if (dt.Rows.Count > 0)
        //    {
        //        for (int k = 0; k < dt.Rows.Count; k++)
        //        {
        //            ddlAlertType.Items.Add(dt.Rows[k][0].ToString());
        //        }
        //    }
        //}

        private void DeleteItem(string argalertid)
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;

                if (!string.IsNullOrEmpty(argalertid))
                {
                    AdminBLL           ws   = new AdminBLL();
                    DeleteAlertRequest _req = new DeleteAlertRequest();

                    _req.Alert_ID = argalertid.ToString();

                    ws.DeleteAlert(_req);

                    MyMasterPage.ShowErrorMessage("Record Deleted Successfully..!");
                    ModalPopupDelete.Hide();
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 8
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     ModalPopupAdd.Hide();
     ModalPopupUpdate.Hide();
     ModalPopupDelete.Hide();
     ModalPopupout.Hide();
     CearlAll();
 }
Ejemplo n.º 9
0
 protected void btncancel2_Click(object sender, EventArgs e)
 {
     try
     {
         ModalPopupDelete.Hide();
     }
     catch (Exception ex)
     {
         TroyLiteExceptionManager.HandleException(ex);
     }
 }
Ejemplo n.º 10
0
 protected void deleteqrybtn_Click(object sender, EventArgs e)
 {
     try
     {
         ModalPopupDelete.Show();
     }
     catch (Exception ex)
     {
         TroyLiteExceptionManager.HandleException(ex);
     }
 }
Ejemplo n.º 11
0
        private void DeleteSOP(string argSOPId)
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                if (!string.IsNullOrEmpty(argSOPId))
                {
                    AdminBLL      ws   = new AdminBLL();
                    AdminDAL      w    = new AdminDAL();
                    SqlConnection conn = new SqlConnection();
                    conn = w.getconnection();

                    DeleteSOPRequest _req = new DeleteSOPRequest();

                    _req.SOP_ID = argSOPId.ToString();
                    string id = argSOPId.ToString();

                    string query = "select top 1 ImagePathName from SOP_Master name where SOP_ID='" + id + "'";

                    SqlCommand cmd = new SqlCommand(query, conn);

                    SqlDataReader rd = cmd.ExecuteReader();
                    string        s  = string.Empty;
                    while (rd.Read())
                    {
                        s = rd.GetValue(0).ToString();
                    }
                    FileInfo TheFile = new FileInfo(MapPath("../Images/") + "\\" + s);
                    if (TheFile.Exists)
                    {
                        File.Delete(MapPath("../Images/") + "\\" + s);
                    }

                    ws.DeleteSOP(_req);
                    //  ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Deleted SuccessFully');", true);

                    HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "DELETE");
                    BindGrid();
                    ModalPopupDelete.Hide();
                    //========================//
                    rd.Close();
                    rd.Dispose();
                    //========================//
                    //Server.Transfer("AlertUpdateComplete.aspx");
                }
            }

            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 12
0
        protected void imgDelete_Click(object sender, EventArgs e)
        {
            SpaMaster MyMasterPage = (SpaMaster)Page.Master;

            DataTable dtViewShift = AdminDAL.Checkmenu(Session["RoleID"].ToString(), "108");

            if (dtViewShift.Rows.Count > 0)
            {
                if (ViewState["SID"] != null)
                {
                    ModalPopupDelete.Show();
                }
            }
            else
            {
                MyMasterPage.ShowErrorMessage("You Do Not Have Permission..!");
            }
        }
Ejemplo n.º 13
0
 protected void Deletepopup_Yes_Click(object sender, EventArgs e)
 {
     log4net.ILog logger = log4net.LogManager.GetLogger("File");
     try
     {
         if (ViewState["Lost_ID"] != null)
         {
             DeleteItem(ViewState["Lost_ID"].ToString());
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Delete SuccessFully');", true);
             BindGridWithFilter();
             ViewState["Lost_ID"] = null;
             ModalPopupDelete.Hide();
         }
     }
     catch (Exception ex)
     {
         logger.Info("LostFoundReport(Deletepopup_Yes_Click):" + ex.Message);
     }
 }
Ejemplo n.º 14
0
        private void DeleteItem()
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                string argPassID = ViewState["OLid"].ToString().Trim();
                dal.executesql("Delete from OffleaveSetting where OLid = '" + argPassID + "' ");
                // Server.Transfer("OffLeaveSetting.aspx");
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;

                MyMasterPage.ShowErrorMessage("Record Delete Sucessfully ..!");
                BindGrid();
                ModalPopupDelete.Hide();
            }

            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 15
0
        private void DeleteItem()
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                string argId1 = ViewState["DDID"].ToString().Trim();
                dal.executesql("Delete From Digital_Dairy Where DDID='" + argId1 + "' ");
                //HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "DELETE");
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;

                MyMasterPage.ShowErrorMessage("Record Deleted sucessfully ..!");
                fillgrid();
                ModalPopupDelete.Hide();

                // Response.Redirect("~/ADMIN/CompleteForm.aspx");
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
Ejemplo n.º 16
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     //dal.executesql("Delete from StaffLocationMap");
     //DataSet dsstaffid = dal.getdataset("select Staff_id,role from userinformation where role='SuperVisor' OR role='Security Officer'");
     //if (dsstaffid.Tables[0].Rows.Count > 0)
     //{
     //    for(int k = 0; k < dsstaffid.Tables[0].Rows.Count; k++)
     //    {
     //        string staffid = dsstaffid.Tables[0].Rows[k][0].ToString();
     //        DataSet dslocation = dal.getdataset("select location_id from location where current_status='Present'");
     //        if (dslocation.Tables[0].Rows.Count > 0)
     //        {
     //            for (int j = 0; j < dslocation.Tables[0].Rows.Count; j++)
     //            {
     //                string locid = dslocation.Tables[0].Rows[j][0].ToString();
     //                dal.executesql("Insert into StaffLocationMap(StaffID,LocationID)values('" +staffid +"','" + locid + "')");
     //            }
     //        }
     //    }
     //}
     //Response.Redirect("DeAssignSiteToUser.aspx");
     ModalPopupDelete.Show();
 }
Ejemplo n.º 17
0
        protected void imgDelete_Click(object sender, EventArgs e)
        {
            SpaMaster MyMasterPage = (SpaMaster)Page.Master;

            DataTable dtViewInventory = AdminDAL.Checkmenu(Session["RoleID"].ToString(), "63");

            if (dtViewInventory.Rows.Count > 0)
            {
                if (ViewState["Item_Id"] != null)
                {
                    ModalPopupDelete.Show();
                }
                //int flag = 0;
                //foreach (GridDataItem row in RadGridCatalog.MasterTableView.Items)
                //{
                //    CheckBox chk1 = (CheckBox)row.FindControl("CheckBox1");
                //    int index = row.ItemIndex;
                //    if (chk1.Checked == true)
                //    {
                //        flag = 1;
                //        break;
                //    }
                //}
                //if (flag == 1)
                //{
                //    ModalPopupDelete.Show();
                //}
                //else
                //{
                //    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Please select  item in the check box.');", true);
                //}
            }
            else
            {
                MyMasterPage.ShowErrorMessage("You Do Not Have Permission..!");
            }
        }
Ejemplo n.º 18
0
 protected void imgDelete_Click(object sender, EventArgs e)
 {
     ModalPopupDelete.Show();
 }
Ejemplo n.º 19
0
 protected void BtnCancel_Click(object sender, EventArgs e)
 {
     ModalPopupAdd.Hide();
     ModalPopupDelete.Hide();
 }