Exemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="item"></param>
        /// <param name="kvs"></param>
        /// <returns></returns>
        private bool Match(tblGwl gwl, KeyValueCollection kvs)
        {
            foreach (KeyValue kv in kvs)
            {
                if (Match(gwl, kv.Key, kv.Value.ToString()))
                {

                }
                else
                {
                    return false;
                }
            }
            return true;
        }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gwl"></param>
 /// <param name="propertyName"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private bool Match(tblGwl gwl, string propertyName, string value)
 {
     string propertyValue = ReflectionHelper.GetPropertyValue(gwl, propertyName).ToString();
     if (propertyValue.Contains(value))
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 3
0
 partial void DeletetblGwl(tblGwl instance);
Exemplo n.º 4
0
 partial void UpdatetblGwl(tblGwl instance);
Exemplo n.º 5
0
 partial void InserttblGwl(tblGwl instance);
Exemplo n.º 6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="g"></param>
        private void SetGwlProperties(tblGwl g)
        {
            g.Serial = txtSerial.Text;
            g.CompanyName = txtCompanyName.Text;
            g.CompanyAddress = txtCompanyAddress.Text;
            g.LegalPerson = txtLegalPerson.Text;
            g.Contact = txtContact.Text;
            g.Phone = txtPhone.Text;
            g.Email = txtEmail.Text;
            g.ValidDate = txtValidDate.Text;
            g.ApproveDate = txtApproveDate.Text;

            g.Usage = txtUsage.Text;
            g.AskingAmount = numAskingAmount.Value;
            g.GwAmount = numAskingAmount.Value;
            g.GwLocation = txtGwLocation.Text;
            g.GwMode = txtGwMode.Text;
            g.WaterSourceMode = txtWaterSourceMode.Text;

            g.BwLocation = txtBwLocation.Text;
            g.BwQuality = txtBwQuality.Text;
            g.BwMode = txtBwMode.Text;
            g.BwAmount = numBwAmount.Value;

            g.WellCount = (int)numWellCount.Value;

            g.Remark = txtRemark.Text;
        }
Exemplo n.º 7
0
 private tblGwl GetGwl()
 {
     if (_gwl == null)
     {
         DB db = GetDB();
         if (this._adeStatus == ADEStatus.Add)
         {
             _gwl = new tblGwl();
         }
         else if (this._adeStatus == ADEStatus.Edit)
         {
             _gwl = db.tblGwl.Single(c => c.GwlID == _gwlID);
         }
     }
     return _gwl;
 }