public void SetDetail(string id)
        {
            //       Dim lnq As New EbrochureSendMailJobLinqDB
            //    Dim dt As New DataTable
            //    dt = lnq.GetDataList("is_send_mail='N'", "", Nothing)
            //    If dt.Rows.Count > 0 Then

            //    End If
            //    lnq = Nothing
            //    dt.Dispose()

            ErmTsPersonalInfoLinq Userinfo = new ErmTsPersonalInfoLinq();
            DataTable dt;
            dt = Userinfo.GetDataList("id=" + id,"",null);
            if (dt.Rows.Count > 0) {
                lblLine1.Text = "คุณ"+ dt.Rows[0]["first_name"] + " " + dt.Rows[0]["last_name"];

                //lblLine1.Text = GetTitleName(dt.Rows[0]["title_name"] + "") + dt.Rows[0]["first_name"] + " " + dt.Rows[0]["last_name"];
                lblLine2.Text ="บริษัท:" + dt.Rows[0]["company_name"] + "";
                lblLine3.Text ="E-Mail:"  + dt.Rows[0]["email"] + "";

                LiveFaceScan.userinfo.id = dt.Rows[0]["id"] + "";
                LiveFaceScan.userinfo.fullname = lblLine1.Text;
                LiveFaceScan.userinfo.email = dt.Rows[0]["email"] + "";
                LiveFaceScan.userinfo.companyname = dt.Rows[0]["company_name"] + "";

            }
            dt.Dispose();
        }
Esempio n. 2
0
 public bool chkPersonalInfoByFirstNameLastName(string firstName, string lastName)
 {
     bool ret = false;
     try {
         DataTable dt = new DataTable();
         ErmTsPersonalInfoLinq lnq = new ErmTsPersonalInfoLinq();
         dt = lnq.GetDataList("first_name='" + firstName + "' and last_name='" + lastName + "' and year(CREATE_ON)=year(getdate())", "", null);
         if (dt.Rows.Count > 0) {
             ret = true;
         }
         dt.Dispose();
     }
     catch (Exception ex) {
         ret = false;
     }
     return ret;
 }
        public void SetUserInfo()
        {
            try
            {
            DataTable dt;
            ErmTsPersonalInfoLinq Userinfo = new ErmTsPersonalInfoLinq();
               // TransactionDB trans = new TransactionDB();

            dt = Userinfo.GetDataList("replace(mobile_no,'-','')='" +  txtNumber.Text + "'", "", null);
             //   trans.CommitTransaction();
            if (dt.Rows.Count > 0)
            {
                LiveFaceScan.userinfo.id = dt.Rows[0]["id"] + "";
                if (Convert.IsDBNull(dt.Rows[0]["first_name"]) == false && Convert.IsDBNull(dt.Rows[0]["last_name"]) == false) {
                    LiveFaceScan.userinfo.fullname = "คุณ" + dt.Rows[0]["first_name"] + " " + dt.Rows[0]["last_name"];
                }
                if (Convert.IsDBNull(dt.Rows[0]["email"]) == false)
                {
                    LiveFaceScan.userinfo.email = dt.Rows[0]["email"] + "";
                }

                if (Convert.IsDBNull(dt.Rows[0]["company_name"]) == false)
                {
                    LiveFaceScan.userinfo.companyname = dt.Rows[0]["company_name"] + "";
                }

                this.Visible = false;
                //this.Close();
                frmSelectBrochures f = new frmSelectBrochures();
                f.ShowDialog();
            }
            else {
                Dialog.frmDialogMsg f = new Dialog.frmDialogMsg();
                f.lblText.Text = "ไม่พบข้อมูล";
                f.ShowDialog();
            }
            }
            catch (Exception exUserinfo) {
                Dialog.frmDialogMsg f = new Dialog.frmDialogMsg();
                f.lblText.Text = "ไม่พบข้อมูล";
                f.ShowDialog();
            }
        }
Esempio n. 4
0
 public bool chkPersonalInfoByEmail(string eMail)
 {
     bool ret = false;
     try
     {
         DataTable dt = new DataTable();
         ErmTsPersonalInfoLinq lnq = new ErmTsPersonalInfoLinq();
         dt = lnq.GetDataList("Email='" + eMail + "'  and year(CREATE_ON)=year(getdate())", "", null);
         if (dt.Rows.Count > 0)
         {
             ret = true;
         }
         dt.Dispose();
     }
     catch (Exception ex)
     {
         ret = false;
     }
     return ret;
 }
Esempio n. 5
0
 public static ErmTsPersonalInfoPara GetPersonalInfoByMemberNo(string MemberNo)
 {
     ErmTsPersonalInfoPara ret = new ErmTsPersonalInfoPara();
     try
     {
         DataTable dt = new DataTable();
         ErmTsPersonalInfoLinq lnq = new ErmTsPersonalInfoLinq();
         dt = lnq.GetDataList("member_no='" + MemberNo + "'", "", null);
         if (dt.Rows.Count > 0)
         {
             ret = lnq.GetParameter(Convert.ToInt64(dt.Rows[0]["id"]),null);
         }
         dt.Dispose();
     }
     catch (Exception ex)
     {
         ret = new ErmTsPersonalInfoPara();
     }
     return ret;
 }