void LoadCheckList()
 {
     try
     {
         Session["CheckList"] = BLLCheckList.GetCheckList(null, null, 0);
         List <ATTCheckList> ListCheckList = (List <ATTCheckList>)Session["CheckList"];
         this.grdCheckListType.DataSource = ListCheckList;
         this.grdCheckListType.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }
Пример #2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (this.ddlCheckListType.SelectedIndex == 0)
        {
            this.lblStatusMessage.Text = "चेकलिष्टको किसिम छान्नहोस।";
            this.programmaticModalPopup.Show();
            return;
        }
        ATTCheckList objCheckList = new ATTCheckList(int.Parse(this.hdnFldCheckListID.Value), this.txtCheckList.Text.Trim(), this.chkActive.Checked == true ? "Y" : "F");

        objCheckList.CheckListType = this.ddlCheckListType.SelectedValue;
        if (this.lstCheckList.SelectedIndex > -1)
        {
            objCheckList.Action = "E";
        }
        else
        {
            objCheckList.Action = "A";
        }
        objCheckList.EntryBy = strUser;
        try
        {
            List <ATTCheckList> ListCheckList = (List <ATTCheckList>)Session["CheckList"];
            BLLCheckList.SaveCheckList(objCheckList);
            if (this.lstCheckList.SelectedIndex > -1)
            {
                ListCheckList[this.lstCheckList.SelectedIndex].CheckListID   = objCheckList.CheckListID;
                ListCheckList[this.lstCheckList.SelectedIndex].CheckListName = objCheckList.CheckListName;
                ListCheckList[this.lstCheckList.SelectedIndex].Active        = objCheckList.Active;
                ListCheckList[this.lstCheckList.SelectedIndex].CheckListType = objCheckList.CheckListType;
            }
            else
            {
                ListCheckList.Add(objCheckList);
            }
            this.lstCheckList.DataSource = ListCheckList;
            this.lstCheckList.DataBind();
            ClearControls();
            this.lblStatusMessage.Text = "CheckList Items Successfully Saved.";
            this.programmaticModalPopup.Show();
        }
        catch (Exception ex)
        {
            this.lblStatusMessage.Text = ex.Message;
            this.programmaticModalPopup.Show();
        }
    }
Пример #3
0
 void LoadCheckList()
 {
     try
     {
         Session["CheckList"] = BLLCheckList.GetCheckList(null, null, 0);
         List <ATTCheckList> ListCheckList = (List <ATTCheckList>)Session["CheckList"];
         this.lstCheckList.DataSource     = ListCheckList;
         this.lstCheckList.DataTextField  = "CHECKLISTNAME";
         this.lstCheckList.DataValueField = "CHECKLISTID";
         this.lstCheckList.DataBind();
     }
     catch (Exception ex)
     {
         this.lblStatusMessage.Text = ex.Message;
         this.programmaticModalPopup.Show();
     }
 }