Esempio n. 1
0
        public void SetDefaultData(string ID)
        {
            DataSet ds = dbs.GetSqlDataSet("select * from eagent where id=" + ID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                // DLUser.Items.Add(new Ext.Net.ListItem(ds.Tables[0].Rows[0]["PAgent"].ToString(), ds.Tables[0].Rows[0]["PAgentID"].ToString()));
                DataTable TTB = new DataTable();
                TTB.Columns.Add("userID");
                TTB.Columns.Add("fullname");
                DataRow dr = TTB.NewRow();
                dr["userid"]   = ds.Tables[0].Rows[0]["PAgentID"].ToString();
                dr["fullname"] = ds.Tables[0].Rows[0]["PAgent"].ToString();
                TTB.Rows.Add(dr);
                SUser.DataSource = TTB;
                SUser.DataBind();
                DLUser.SelectedIndex = 0;
                TXTBdate.Text        = ds.Tables[0].Rows[0]["Bdate"].ToString();
                TXTEdate.Text        = ds.Tables[0].Rows[0]["Edate"].ToString();
                string ckk = ds.Tables[0].Rows[0]["St"].ToString();
                if (ckk == "1")
                {
                    CK.Checked = true;
                }
            }
        }
Esempio n. 2
0
 protected void GetUser(object sender, DirectEventArgs e)
 {
     if (X.GetValue("DLUser").Length > 2)
     {
         DataSet ds = DIMERCO.SDK.Utilities.LSDK.getUserDataBYUserName(X.GetValue("DLUser"), 10);
         //SqlConnection cn = new SqlConnection("Data Source=10.130.40.20;Initial Catalog=ReSM;User ID=sa;Password=dim1rc0@");
         //string sql = "select distinct top 10 UserID,fullname from smuser where fullname like '%" + X.GetValue("DLUser") + "%'";
         //SqlDataAdapter da = new SqlDataAdapter(sql, cn);
         //DataSet ds = new DataSet();
         //da.Fill(ds);
         DataTable tb = ds.Tables[0];
         SUser.DataSource = tb;
         SUser.DataBind();
         ds.Dispose();
     }
 }
Esempio n. 3
0
        public void SetDefaultData(string ID)
        {
            DataSet ds = dbs.GetSqlDataSet("select * from ESUser where id=" + ID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                // DLUser.Items.Add(new Ext.Net.ListItem(ds.Tables[0].Rows[0]["PAgent"].ToString(), ds.Tables[0].Rows[0]["PAgentID"].ToString()));
                DataTable TTB = new DataTable();
                TTB.Columns.Add("UserID");
                TTB.Columns.Add("FullName");
                DataRow dr = TTB.NewRow();
                dr["UserID"]   = ds.Tables[0].Rows[0]["Userid"].ToString();
                dr["FullName"] = ds.Tables[0].Rows[0]["UserName"].ToString();
                TTB.Rows.Add(dr);
                SUser.DataSource = TTB;
                SUser.DataBind();
                DLUser.SelectedIndex = 0;
                DLCurrency.Value     = ds.Tables[0].Rows[0]["Currency"].ToString();
            }
        }
Esempio n. 4
0
      protected void GetUser(object sender, DirectEventArgs e)
      {
          if (X.GetValue("DLUser").Length > 2)
          {
              // if (Request.QueryString["S"].ToString() == "GCRSHA")
              // {
              //DataSet ds=dbs.GetSqlDataSet("select Userid as UserID,UserName as FullName from ESUser where station='GCRSHA' and username like '%"+X.GetValue("DLUser")+"%'");

              //DataTable tb = addtb(ds.Tables[0]);
              //SUser.DataSource = tb;
              //SUser.DataBind();
              //ds.Dispose();
              // }
              // else if (Request.QueryString["S"].ToString() == "GCRHKG")
              // {
              //     DataSet ds = dbs.GetSqlDataSet("select Userid as UserID,UserName as FullName from ESUser where station='GCRHKG' and username like '%"+X.GetValue("DLUser")+"%'");

              //     DataTable tb = addtb(ds.Tables[0]);
              //     SUser.DataSource = tb;
              //     SUser.DataBind();
              //     ds.Dispose();
              // }
              // else
              // {
              DataSet ds = DIMERCO.SDK.Utilities.LSDK.getUserDataBYCostCenterNUser(Request.QueryString["S"].ToString(), "", X.GetValue("DLUser"));
              //SqlConnection cn = new SqlConnection("Data Source=10.130.40.20;Initial Catalog=ReSM;User ID=sa;Password=dim1rc0@");
              //string sql = "select distinct userid,fullname from  SMUser inner join SMstation on SMUser.stationid=SMstation.stationid where StationCode='" + Request.QueryString["S"].ToString() + "' and SMUser.fullname like '%" + X.GetValue("DLUser") + "%'";
              //SqlDataAdapter da = new SqlDataAdapter(sql, cn);
              //DataSet ds = new DataSet();
              //da.Fill(ds);
              DataTable tb = addtb(ds.Tables[0]);
              SUser.DataSource = tb;
              SUser.DataBind();
              ds.Dispose();
          }
          // }
      }