예제 #1
0
        /// <summary>
        /// PH_Flow_UserInsert
        /// </summary>
        /// <param name="strConnDB"></param>
        /// <param name="drProfile"></param>
        /// <param name="drVenders"></param>
        /// <returns></returns>
        public PHCore_Status PH_Flow_UserInsert(string strConnDB, PHDS_User.User_ProfileRow drProfile, List <PHDS_User.User_VendorRow> drVenders)
        {
            PHCore_Status status = new PHCore_Status();

            try
            {
                drProfile.UserID = PH_UserProfile.PH_UserProfile_GetMaxID(strConnDB);
                PH_UserProfile.PH_UserProfile_Insert(strConnDB, drProfile);

                if (drVenders != null && drVenders.Count > 0)
                {
                    foreach (PHDS_User.User_VendorRow dr in drVenders)
                    {
                        dr.UserID = drProfile.UserID;
                        PH_UserVendor.PH_UserVendor_Insert(strConnDB, dr);
                    }
                }

                status.Status = PHCore_Status.SignInStatus.Success;
            }
            catch (Exception ex)
            {
                status.Status  = PHCore_Status.SignInStatus.Failure;
                status.Message = ex.Message;
            }
            return(status);
        }
예제 #2
0
        public string[] GetVendorCode(string prefixText)
        {
            DataTable     dt    = PH_UserVendor.PH_UserVendor_SelectAll(AppCode.strConnDB);
            List <string> items = new List <string>(dt.Rows.Count);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string strName = dt.Rows[i]["vendor_code"].ToString();
                items.Add(strName);
            }
            return(items.ToArray());
        }
예제 #3
0
        public string[] GetVendorCode(string prefixText)
        {
            DataTable dt = PH_UserVendor.PH_UserVendor_SelectAll(AppCode.strConnDB);
            DataView  dv = dt.DefaultView;

            dv.RowFilter = new System.Text.StringBuilder(" vendor_code like '%" + prefixText + "%'").ToString();

            List <string> items = new List <string>(dv.Count);

            for (int i = 0; i < dv.Count; i++)
            {
                string strName = dv[i]["vendor_code"].ToString() + "-" + dv[i]["Vendor_Name_en"].ToString();
                items.Add(strName);
            }
            return(items.ToArray());
        }