コード例 #1
0
 private void SetInfo(Foresight.DataAccess.CKContarct data)
 {
     this.tdContractName.Value     = data.ContractName;
     this.tdContractFullName.Value = data.ContractFullName;
     this.tdAddress.Value          = data.Address;
     this.tdContactMan.Value       = data.ContactMan;
     this.tdPhoneNumber.Value      = data.PhoneNumber;
     this.tdFaxNumber.Value        = data.FaxNumber;
     this.tdEMailAddress.Value     = data.EMailAddress;
     this.tdRemark.Value           = data.Remark;
     this.ContractNumber           = data.ContractNumber;
 }
コード例 #2
0
ファイル: CKContarct.cs プロジェクト: sd009896/CustomerMall
        public static string GetLastestContractNumber(SqlHelper helper)
        {
            CKContarct history = CKContarct.GetLastCKContarct(helper);
            string     Part1   = "CS_";
            int        number  = 1;

            if (history != null && !string.IsNullOrEmpty(history.ContractNumber))
            {
                string Number  = history.ContractNumber.Replace("CS_", "");
                int    _number = 0;
                int.TryParse(Number, out _number);
                number = _number + 1;
            }
            return(Part1 + number.ToString("D8"));
        }
コード例 #3
0
ファイル: CKContarct.cs プロジェクト: sd009896/CustomerMall
        public static Ui.DataGrid GetCKContarctGridByKeywords(string Keywords, string orderBy, long startRowIndex, int pageSize)
        {
            long totalRows = 0;
            List <SqlParameter> parameters = new List <SqlParameter>();
            List <string>       conditions = new List <string>();

            conditions.Add("1=1");
            if (!string.IsNullOrEmpty(Keywords))
            {
                conditions.Add("([ContractName] like @Keywords or [ContractFullName] like @Keywords or [ContactMan] like @Keywords or [PhoneNumber] like @Keywords or [FaxNumber] like @Keywords)");
                parameters.Add(new SqlParameter("@Keywords", "%" + Keywords + "%"));
            }
            string fieldList = "[CKContarct].*";
            string Statement = " from [CKContarct] where  " + string.Join(" and ", conditions.ToArray());

            CKContarct[] list = new CKContarct[] { };
            list = GetList <CKContarct>(fieldList, Statement, parameters, orderBy, startRowIndex, pageSize, out totalRows).ToArray();
            DataAccess.Ui.DataGrid dg = new Ui.DataGrid();
            dg.rows  = list;
            dg.total = totalRows;
            dg.page  = pageSize;
            return(dg);
        }