Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["codePK"] == null)
            {
                Response.Redirect("/");
            }


            ShowDiv();
            try
            {
                if (!this.IsPostBack)
                {
                    string sql = "";
                    if (Session["UserCpoint"].ToString() == "0")
                    {
                        sql = "SELECT * FROM tbl_cpoint ORDER BY cpoint_id";
                    }
                    else
                    {
                        sql = "SELECT * FROM tbl_cpoint WHERE cpoint_id = '" + Session["UserCpoint"].ToString() + "'";
                    }
                    function.getListItem(txtCpoint, sql, "cpoint_name", "cpoint_id");
                    function.GetList(txtAround, "AroundList");
                    function.GetList(txtPosAleat, "PosList");
                    function.GetList(txtPosSup, "PosList");
                    function.GetList(txtPosCom, "PosList");
                    function.GetList(txtCB, "CabinetList");
                    function.GetList(txtCBClaim, "CabinetList");

                    string sql_Device = "SELECT * FROM tbl_device ORDER BY device_name";
                    function.getListItem(txtDevice, sql_Device, "device_name", "device_id");
                    txtDevice.Items.Insert(0, new ListItem("", ""));
                    BindCom();
                    BindDevice();
                    BindImg();
                    BindDoc();
                    PageLoadData();

                    /*if(function.GetSelectValue("tbl_claim","claim_id='"+ Session["CodePK"].ToString()+"'", "claim_status") != "1")
                     * {
                     *  cardBody.Attributes.Add("readonly","true");
                     * }*/
                }
            }
            catch { }
        }