예제 #1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            DTO.LicenseTypet licensetype = new DTO.LicenseTypet();
            licensetype.AGENT_TYPE        = ddlAgentTypeUpdate.SelectedValue;
            licensetype.INSURANCE_TYPE    = ddlInsuranUpdate.SelectedValue;
            licensetype.LICENSE_TYPE_CODE = hdTypeCode.Value;
            licensetype.LICENSE_TYPE_NAME = txtUpdatename.Text;
            var res = biz.UpdateLicenseType(licensetype);

            if (res.ErrorMsg != null)
            {
                UCModalError1.ShowMessageError = res.ErrorMsg;
                UCModalError1.ShowModalError();
            }
            else
            {
                txtLicenseName.Text = "";
                BindDrop();
                ddlInsuran.SelectedValue           = "";
                ddlAgentype.SelectedValue          = "";
                UCModalSuccess1.ShowMessageSuccess = Resources.infoSetSubject_002;
                UCModalSuccess1.ShowModalSuccess();
            }
            ModalPopupUpdate.Hide();
        }
예제 #2
0
 protected void lbtUpdate_Click(object sender, EventArgs e)
 {
     txtUpdateGroupName.Text = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblName")).Text;
     txtUpdatePass.Text      = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblExamPass")).Text;
     HID.Value = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblId")).Text;
     ModalPopupUpdate.Show();
 }
예제 #3
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     ModalPopupAdd.Hide();
     ModalPopupUpdate.Hide();
     ModalPopupDelete.Hide();
     ModalPopupout.Hide();
     CearlAll();
 }
예제 #4
0
 protected void lbtUpdate_Click(object sender, EventArgs e)
 {
     hdTypeCode.Value = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblTypeCode")).Text;
     ddlAgentTypeUpdate.SelectedValue = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblAgenCode")).Text;
     ddlInsuranUpdate.SelectedValue   = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblInsuranCode")).Text;
     txtUpdatename.Text = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblNameType")).Text;
     ModalPopupUpdate.Show();
 }
예제 #5
0
        protected void imgUpdate_Click(object sender, EventArgs e)
        {
            SpaMaster MyMasterPage = (SpaMaster)Page.Master;

            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                DataTable dtAddNewPass = AdminDAL.Checkmenu(Session["RoleID"].ToString(), "94");

                if (dtAddNewPass.Rows.Count > 0)
                {
                    if (ViewState["Passid"] != null)
                    {
                        string _BTId = ViewState["Passid"].ToString();
                        string state = string.Empty;

                        SqlDataReader rd = dal.getDataReader("select Pass_Status from Pass_Master where Pass_id ='" + _BTId + "'");//change by rakesh
                        if (rd.Read())
                        {
                            state = (rd.GetValue(0).ToString().Trim());
                        }
                        rd.Close();
                        rd.Dispose();
                        if (state == "Free")
                        {
                            ModalPopupUpdate.Show();

                            fillpasstype();
                            PopulatePageCntrls(_BTId);
                            //HttpContext.Current.Items.Add(ContextKeys.CTX_UPDATE_URL, Request.Url.ToString());
                            //HttpContext.Current.Items.Add(ContextKeys.CTX_BT_ID, _BTId);
                            //Server.Transfer("KeyDataUpdate.aspx");
                        }
                        else
                        {
                            MyMasterPage.ShowErrorMessage("Cannot be Edit It is Reserved ..!");

                            //lblerror.Visible = true;
                            //lblerror.Text = "Can't be Edit It's Reserved ..!";
                        }
                    }
                }
                else
                {
                    MyMasterPage.ShowErrorMessage("You Do not Have Permission ..!");
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
예제 #6
0
        protected void imgUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;

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

                if (dtViewInventory.Rows.Count > 0)
                {
                    if (ViewState["Item_Id"] != null)
                    {
                        PopulatePageCntrls(ViewState["Item_Id"].ToString());
                        ModalPopupUpdate.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)
                    //{
                    //    PopulatePageCntrls(ViewState["Item_Id"].ToString());
                    //    ModalPopupUpdate.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..!");
                }
            }
            catch (Exception ex) { }
        }
예제 #7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            try
            {
                SpaMaster       MyMasterPage      = (SpaMaster)Page.Master;
                AddNewInventory objInventory_Data = new AddNewInventory();
                AdminBLL        ws = new AdminBLL();
                if (txtItemNameupd.Text.Trim() != "")
                {
                    objInventory_Data.Item_id     = txtItemID.Text.Trim();
                    objInventory_Data.Item_Name   = txtItemNameupd.Text.Trim();
                    objInventory_Data.Item_qty    = txtqunatityupd.Text.Trim();
                    objInventory_Data.CreatedBy   = txtCreatedByupd.Text.Trim();
                    objInventory_Data.Item_Type   = ddItemTypeupdate.Text.Trim();
                    objInventory_Data.CreatedTime = Convert.ToDateTime(txtCreatedTime.Text.Trim());
                    objInventory_Data.EditBy      = txtEditBy.Text.Trim();

                    if (txtCreatedBy.Text.Trim() != "")
                    {
                        objInventory_Data.EditTime = DateTime.Now;
                    }

                    ws.UpdateInventoryData(objInventory_Data);
                    BindGridTelerik();
                    MyMasterPage.ShowErrorMessage("Record Updated Successfully..!");
                    // ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Updated Successfully..!');", true);
                    ModalPopupUpdate.Hide();
                    //HttpContext.Current.Items.Add(ContextKeys.CTX_COMPLETE, "UPDATE");
                    //Server.Transfer("CompleteForm.aspx");
                }
                else
                {
                    MyMasterPage.ShowErrorMessage("Invalid Item Name ..!");
                    //lblErrMsg.Visible = true;
                    //lblErrMsg.Text = "Invalid Item Name ..!";
                    //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Invalid Item Name ..!');", true);
                }
            }
            catch (Exception ex)
            {
                logger.Info(ex.Message);
            }
        }
예제 #8
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            ModalPopupUpdate.Hide();
            DTO.GBHoliday holiday = new GBHoliday();
            holiday.HL_DATE = Convert.ToDateTime(lbldatate.Text);
            holiday.HL_DESC = txtUpdatename.Text;
            var res = biz.UpdateHoliday(holiday);

            if (res.ErrorMsg == null)
            {
                UCModalSuccess1.ShowMessageSuccess = Resources.infoSetHoliday_003;
                UCModalSuccess1.ShowModalSuccess();
            }
            else
            {
                UCModalError1.ShowMessageError = res.ErrorMsg;
                UCModalError1.ShowModalError();
            }
        }
예제 #9
0
        protected void imgUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                SpaMaster MyMasterPage = (SpaMaster)Page.Master;

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

                if (dtViewShift.Rows.Count > 0)
                {
                    if (ViewState["SID"] != null)
                    {
                        ModalPopupUpdate.Show();
                        FillUpdate(ViewState["SID"].ToString());
                    }
                }
                else
                {
                    MyMasterPage.ShowErrorMessage("You Do Not Have Permission..!");
                }
            }
            catch (Exception ex) { }
        }
예제 #10
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     ModalPopupUpdate.Hide();
 }
예제 #11
0
        protected void btnSearchLocationUpdate_Click(object sender, EventArgs e)
        {
            SpaMaster MyMasterPage = (SpaMaster)Page.Master;

            log4net.ILog logger = log4net.LogManager.GetLogger("File");
            string       minute = "";

            if (tsFromTimeupd.Minute == 0)
            {
                minute = tsFromTimeupd.Minute.ToString() + "0";
            }
            else
            {
                minute = tsFromTimeupd.Minute.ToString();
            }

            string FromTime = tsFromTimeupd.Hour + ":" + minute + " ";

            //int.Parse(FromTime.Split(' ')[0].Split(':')[1]);

            if (tsFromTimeupd.AmPm == TimeSelector.AmPmSpec.AM)
            {
                FromTime += "A.M.";
            }
            else
            {
                FromTime += "P.M.";
            }
            string tominute = "";

            if (tsToTimeupd.Minute == 0)
            {
                tominute = tsToTimeupd.Minute.ToString() + "0";
            }
            else
            {
                tominute = tsToTimeupd.Minute.ToString();
            }

            string ToTime = tsToTimeupd.Hour + ":" + tominute + " ";

            if (tsToTimeupd.AmPm == TimeSelector.AmPmSpec.AM)
            {
                ToTime += "A.M.";
            }
            else
            {
                ToTime += "P.M.";
            }
            try
            {
                dal.executesql("Update Shift_Master set ShiftTimeFrom='" + FromTime + "',ShiftTimeTo='" + ToTime + "' where shift_ID=" + hdnitmID.Value.ToString());
                ViewState["SID"] = "";
                BindGridTelerik();
                ModalPopupUpdate.Hide();
                MyMasterPage.ShowErrorMessage("Record Updated Successfully");
                //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Record Submitted..!');", true);
            }
            catch (Exception ex)
            {
                MyMasterPage.ShowErrorMessage("Error Occurred..!");
                //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "AlertMessage", " alert('Error Occurred..!');", true);
                logger.Info(ex.Message);
            }
        }
예제 #12
0
 protected void lbtUpdate_Click(object sender, EventArgs e)
 {
     lbldatate.Text     = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lbldate")).Text;
     txtUpdatename.Text = ((Label)((GridViewRow)((LinkButton)sender).Parent.Parent).FindControl("lblNamedate")).Text;
     ModalPopupUpdate.Show();
 }