コード例 #1
0
        public void ddlgroup(int ClientId)
        {
            List <GroupModel> li = GS.GetGroupByClientId(ClientId);

            if (li != null)
            {
                var list = li.Select(o => new { o.Name, o.GroupID });
                BindingClass.BindDropDown(ddlGroup, list, "Name", "GroupID", "Select Branch");
            }
            else
            {
                BindingClass.ClearDropDown(ddlGroup, "Select Branch");
            }
        }
コード例 #2
0
        public void ddlclient()
        {
            List <ClientModel> li = CS.GetClient();

            if (li != null)
            {
                var list = li.Select(o => new { o.Name, o.ClientID });
                BindingClass.BindDropDown(ddlClient, list, "Name", "ClientID", "Select Client");
            }
            else
            {
                BindingClass.ClearDropDown(ddlClient, "Select Client");
            }
        }
コード例 #3
0
        public void ddlObjsensorbind(int ObjectId)
        {
            List <EventConfigurationLocationModel> li = ECS.GetObjectSensorsByObjId(ObjectId);

            if (li != null)
            {
                var list = li.Select(o => new { o.Location, o.objectsensorId });
                BindingClass.BindDropDown(ddlObjSensor, list, "Location", "objectsensorId", "Select Location");
            }
            else
            {
                BindingClass.ClearDropDown(ddlObjSensor, "Select Location");
            }
        }
コード例 #4
0
 public void ClearControls()
 {
     try
     {
         List <object> li = new List <object>();
         BindingClass.ClearDropDown(ddlclient, "Select Client");
         BindingClass.ClearDropDown(ddlgroup, "Select Group");
         BindingClass.RepeaterViewBind(rptObject, li);
         BindingClass.RepeaterViewBind(rptTracker, li);
         BindingClass.RepeaterViewBind(rptAttendance, li);
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #5
0
 protected void ddlobject_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlobject.SelectedValue != "0")
     {
         int val = Convert.ToInt32(ddlobject.SelectedValue);
         ddlObjectSensorbind(val);
         BindingClass.ClearGridView(gvdReport);
     }
     else
     {
         BindingClass.ClearGridView(gvdReport);
         BindingClass.ClearDropDown(ddlobjectSensor, "Select");
     }
 }
コード例 #6
0
        public void ddlobject(int GroupId)
        {
            List <ObjectModel> li = OBJ.GetObjectsByGroupId(GroupId);

            if (li != null)
            {
                var list = li.Select(o => new { o.Name, o.ObjectID });
                BindingClass.BindDropDown(ddlObject, list, "Name", "ObjectID", "Select Device");
            }
            else
            {
                BindingClass.ClearDropDown(ddlObject, "Select Device");
            }
        }
コード例 #7
0
 public void ddlClientBind()
 {
     try
     {
         List <ClientIDName> list = cobj.getClientList();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlClient, list, "Name", "ClientID", "Select Client");
             BindingClass.ClearDropDown(ddlGroup, "Select Branch");
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             if (Session["admin"] != null)
             {
                 ddlClientBind();
                 ddlConditionBind();
             }
             else if (Session["poweruser"] != null)
             {
                 divClient.Visible = false;
                 var list  = (LoginModelForUser)Session["poweruser"];
                 int _clId = list.ClientID;
                 ddlGroupbind(_clId);
                 ddlGroup.Visible = true;
                 BindingClass.ClearDropDown(ddlGroup, "Select Branch");
                 BindingClass.ClearDropDown(ddlObject, "Select Device");
                 BindingClass.ClearDropDown(ddlObjSensor, "Select Location");
                 ddlConditionBind();
             }
             else if (Session["user"] != null)
             {
                 divClient.Visible = false;
                 divGroup.Visible  = false;
                 int             loginID = Convert.ToInt32(Session["user"]);
                 LoginGroupModel li      = LGS.GetLoginGroupByLogin(loginID);
                 if (li != null)
                 {
                     ddlObjectbind(li.GroupID);
                     ddlObject.Visible = true;
                     BindingClass.ClearDropDown(ddlObjSensor, "Select Location");
                     ddlConditionBind();
                 }
             }
             else
             {
                 Response.Redirect("Login.aspx");
             }
         }
         catch (Exception)
         { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     }
 }
コード例 #9
0
 public void ddlCategoryBind()
 {
     try
     {
         List <CategoryIDName> list = comObj.getCategoryIDName();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlcategory, list, "Category", "CategoryID", "Select Category");
         }
         else
         {
             BindingClass.ClearDropDown(ddlcategory, "Select Category");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #10
0
 protected void ddlGroup_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlGroup.SelectedValue != "0")
         {
             var _sltdval = ddlGroup.SelectedValue; int val = Convert.ToInt32(_sltdval); ddlobject(val);
         }
         else
         {
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
         allowStaticMethods("staticMethod('Disable');");
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #11
0
ファイル: Reports.aspx.cs プロジェクト: salmansajid/t-iot-api
 protected void ddlObjectbind(int GroupId)
 {
     try
     {
         List <ObjectListDashboard> list = objC.getObjectList(GroupId);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlObject, list, "Name", "ObjectID", "Select Device");
         }
         else
         {
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
     }
     catch (Exception) { }
     //{ Alert = AlertsClass.ErrorWentWrong; AlertScriptManager(Alert); }
 }
コード例 #12
0
 public void ddlObjectbind(int groupId)
 {
     try
     {
         List <ObjectListDashboard> list = cObj.getObjectList(groupId);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlobject, list, "Name", "ObjectID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlobject, "Select");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #13
0
 public void ddlLoginBind(int clientID)
 {
     try
     {
         List <LoginIDName> list = cobj.getLoginList(clientID);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlLogin, list, "Name", "LoginID", "Select User");
         }
         else
         {
             BindingClass.ClearDropDown(ddlLogin, "Select User");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #14
0
 protected void ddlgroup_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlgroup.SelectedValue != "0")
         {
             ddlObjectbind(Convert.ToInt32(ddlgroup.SelectedValue));
         }
         else
         {
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
         allowStaticMethods("staticMethod();");
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #15
0
 public void ddlClientbind()
 {
     try
     {
         List <ClientIDName> list = cObj.getClientList();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlclient, list, "Name", "ClientID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlclient, "Select");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #16
0
 public void ddlGroupbind(int clientId)
 {
     try
     {
         List <GroupIDName> list = cObj.getGroupList(clientId);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlgroup, list, "Name", "GroupID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlgroup, "Select");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #17
0
 public void ddlGroupbind(int clientId)
 {
     try
     {
         List <GroupIDName> list = cObj.getGroupList(clientId);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlgroup, list, "Name", "GroupID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlgroup, "Select");
         }
     }
     catch (Exception)
     { alert = AlertsClass.ErrorWentWrong; alertScriptManager(alert); }
 }
コード例 #18
0
 public void ddlObjectSensorbind(int objectId)
 {
     try
     {
         List <ObjectSensorIDName> list = cObj.getRelaySensorByObject(objectId, "Serial");
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlobjectSensor, list, "Name", "ObjectSensorID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlobjectSensor, "Select");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #19
0
ファイル: Reports.aspx.cs プロジェクト: salmansajid/t-iot-api
 public void ddlGroupbind(int ClientId)
 {
     try
     {
         List <GroupIDName> li = objC.getGroupList(ClientId);
         if (li.Count > 0)
         {
             BindingClass.BindDropDown(ddlgroup, li, "Name", "GroupID", "Select Branch");
         }
         else
         {
             BindingClass.ClearDropDown(ddlgroup, "Select Branch");
         }
     }
     catch (Exception) { }
     //{ Alert = AlertsClass.ErrorWentWrong; AlertScriptManager(Alert); }
 }
コード例 #20
0
 public void ddlClientbind()
 {
     try
     {
         List <ClientIDName> list = cObj.getClientList();
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlclient, list, "Name", "ClientID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlclient, "Select");
         }
     }
     catch (Exception)
     { alert = AlertsClass.ErrorWentWrong; alertScriptManager(alert); }
 }
コード例 #21
0
 public void ddlObjectBind()
 {
     try
     {
         List <ObjectIDName> list = cobj.getObjectListByClient(Convert.ToInt32(ddlClient.SelectedValue));
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlObject, list, "Name", "ObjectID", "Select Device");
         }
         else
         {
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #22
0
 protected void ddlobject_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlobject.SelectedValue != "0")
         {
             int val = Convert.ToInt32(ddlobject.SelectedValue);
             ddlObjectSensorbind(val);
         }
         else
         {
             BindingClass.ClearDropDown(ddlobjectSensor, "Select");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
     allowStaticMethods("staticMethod();");
 }
コード例 #23
0
 public void ddlObjectSensorbind(int objectId)
 {
     try
     {
         List <ObjectSensorIDName> list = cObj.getBasicSensorByObject(objectId, 7);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlobjectSensor, list, "Name", "ObjectSensorID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlobjectSensor, "Select");
         }
         allowStaticMethods();
     }
     catch (Exception)
     { alert = AlertsClass.ErrorWentWrong; alertScriptManager(alert); }
 }
コード例 #24
0
 public void ddlObjectbind(int groupId)
 {
     try
     {
         List <ObjectListDashboard> list = cObj.getObjectList(groupId);
         if (list.Count > 0)
         {
             BindingClass.BindDropDown(ddlobject, list, "Name", "ObjectID", "Select");
         }
         else
         {
             BindingClass.ClearDropDown(ddlobject, "Select");
         }
         allowStaticMethods();
     }
     catch (Exception)
     { alert = AlertsClass.ErrorWentWrong; alertScriptManager(alert); }
 }
コード例 #25
0
        public void ddlNAsensorBind()
        {
            try
            {
                List <SensorIDSourceID> list = obj.getNASensorListByObject(Convert.ToInt32(ddlObject.SelectedValue));
                if (list.Count > 0)
                {
                    BindingClass.BindDropDown(ddlSensor, list, "SourceID", "SensorID", "Select Sensor");
                }
                else
                {
                    BindingClass.ClearDropDown(ddlObject, "Select Device");
                }
            }

            catch (Exception)
            { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
        }
コード例 #26
0
        protected void ddlObject_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlObject.SelectedValue != "0")
                {
                    gridBind();
                }
                else
                {
                    BindingClass.ClearDropDown(ddlObject, "Select Device");
                }
                allowStaticMethods("staticMethod();applyDatatable('.gvdObjectMntClass');");
            }

            catch (Exception)
            { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
        }
コード例 #27
0
        public void ddlSensorBind()
        {
            try
            {
                List <SensorIDSourceID> list = comObj.getSensorIDSourceID();
                if (list.Count > 0)
                {
                    BindingClass.BindDropDown(ddlSensor, list, "SourceID", "SensorID", "Select Sensor");
                }
                else
                {
                    BindingClass.ClearDropDown(ddlObject, "Select Device");
                }
            }

            catch (Exception)
            { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
        }
コード例 #28
0
 protected void ddlGroupbind(int ClientId)
 {
     try
     {
         List <GroupModel> li = GS.GetGroupByClientId(ClientId);
         if (li != null)
         {
             var list = li.Select(o => new { o.Name, o.GroupID });
             BindingClass.BindDropDown(ddlgroup, list, "Name", "GroupID", "Select Branch");
         }
         else
         {
             BindingClass.ClearDropDown(ddlgroup, "Select Branch");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #29
0
 protected void ddlClientbind()
 {
     try
     {
         List <ClientModel> li = CL.GetClient();
         if (li != null)
         {
             var list = li.Select(o => new { o.Name, o.ClientID });
             BindingClass.BindDropDown(ddlclient, list, "Name", "ClientID", "Select Client");
         }
         else
         {
             BindingClass.ClearDropDown(ddlclient, "Select Client");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }
コード例 #30
0
 protected void ddlObjectbind(int GroupId)
 {
     try
     {
         List <ObjectModel> li = OBJ.GetObjectsByGroupId(GroupId);
         if (li != null)
         {
             var list = li.Select(o => new { o.Name, o.ObjectID });
             BindingClass.BindDropDown(ddlObject, list, "Name", "ObjectID", "Select Device");
         }
         else
         {
             BindingClass.ClearDropDown(ddlObject, "Select Device");
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }