コード例 #1
0
        public void BindCycleCountLocation()
        {
            DataTable         dt          = new DataTable();
            DataSet           ds          = new DataSet();
            iCycleCountClient cycleclient = new iCycleCountClient();
            CustomProfile     profile     = CustomProfile.GetProfile();
            //string Object = "Location";
            string Object = hdnobject.Value;

            string SessionID = Session.SessionID;

            try
            {
                ds = cycleclient.GetCycleCountTempDataByLoc(Object, profile.Personal.UserID, SessionID, profile.DBConnection._constr);
                dt = ds.Tables[0];
                if (dt.Rows.Count > 0)
                {
                    txtgridvalues.Text     = "Location";
                    grdlocation.DataSource = ds.Tables[0];
                    grdlocation.DataBind();
                }
                else
                {
                    grdlocation.DataSource = null;
                    grdlocation.DataBind();
                }
            }
            catch { }
            finally { cycleclient.Close(); }
        }