Beispiel #1
0
 /*__________________________________________________________________________________________*/
 private bool commentDataChanged()
 {
     for (int i = 0; i < _strComments.Length; i++)
     {
         if ((!string.IsNullOrEmpty(_strComments[i])) && (i >= _custNotes.Count || _strComments[i] != _custNotes[i].ContactNote))
         {
             CustomerNotesVO newnote = new CustomerNotesVO();
             newnote.ContactNote           = _strComments[i];
             newnote.CustomerProductNoteId = _strCustProdNoteId[i];
             newnote.CreatedBy             = _strUser;
             newnote.CreationDate          = ShopDateTime.Instance.ShopDate;
             newnote.UpdatedDate           = ShopDateTime.Instance.ShopDate;
             newnote.StoreNumber           = _strStoreNumber;
             updatedNotes.Add(newnote);
         }
     }
     if (updatedNotes.Count > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
 /*__________________________________________________________________________________________*/
 private void LoadUpdatedNotesInCustomerObject()
 {
     //Set the Notes data for the customer
     _updatedCustomer = new CustomerVO();
     if (_notesTable != null)
     {
         foreach (DataRow note in _notesTable.Rows)
         {
             var    commentDate       = Utilities.GetDateTimeValue(note.ItemArray[(int)customernotesrecord.CREATIONDATE], DateTime.MaxValue);
             var    contactDate       = Utilities.GetDateTimeValue(note.ItemArray[(int)customernotesrecord.CONTACTDATE], DateTime.MaxValue);
             var    commentUpdateDate = Utilities.GetDateTimeValue(note.ItemArray[(int)customernotesrecord.UPDATEDATE], DateTime.MaxValue);
             string storeNumber       = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.STORENUMBER], "");
             string contactResult     = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CONTACTRESULT], "");
             string contactStatus     = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CONTACTSTATUS], "");
             string comments          = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CONTACTNOTE], "");
             string commentsby        = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CREATEDBY], "");
             string custProdNoteId    = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CUSTOMERPRODUCTNOTEID], "");
             string commentCode       = Utilities.GetStringValue(note.ItemArray[(int)customernotesrecord.CUSTOMERNOTESCODE], "");
             var    custnote          = new CustomerNotesVO(contactResult, contactStatus, comments, contactDate, commentDate, commentUpdateDate, commentsby, commentCode, custProdNoteId, storeNumber);
             _updatedCustomer.addNotes(custnote);
         }
     }
 }
        private void LoadCustData()
        {
            if (CustToView != null)
            {
                //Parse the feet and inches data from the height data
                if (CustToView.Height.Trim().Length != 0)
                {
                    string strHt               = CustToView.Height.ToString();
                    int    feetIndexinHeight   = strHt.IndexOf('\'');
                    int    inchesIndexinHeight = strHt.IndexOf('\"');
                    if (feetIndexinHeight > 0)
                    {
                        this.pwnapp_height.Text = strHt.Substring(0, feetIndexinHeight);
                    }
                    this.pwnapp_heightinches.Text = inchesIndexinHeight > 0 ? strHt.Substring(feetIndexinHeight + 1, strHt.Length - inchesIndexinHeight) : "";
                }
                if (CustToView.Weight != 0)
                {
                    this.pwnapp_weight.Text = CustToView.Weight.ToString();
                }

                //The following code sets the selected item in the combo boxes
                //for gender, race, title, title suffix, state, eye color, hair color,
                //to the retrieved value from the database for the customer

                ComboBox custGender = (ComboBox)this.pwnapp_sex.Controls[0];
                foreach (ComboBoxData currgender in custGender.Items)
                {
                    if (currgender.Code == CustToView.Gender)
                    {
                        custGender.SelectedIndex = custGender.Items.IndexOf(currgender);
                        break;
                    }
                }
                custGender = null;
                ComboBox custrace = (ComboBox)this.pwnapp_race.Controls[0];
                foreach (ComboBoxData currrace in custrace.Items)
                {
                    if (currrace.Code == CustToView.Race)
                    {
                        custrace.SelectedIndex = custrace.Items.IndexOf(currrace);
                        break;
                    }
                }
                custrace = null;
                ComboBox custEyeColor = (ComboBox)this.pwnapp_eyes.Controls[0];
                foreach (ComboBoxData curreyecolor in custEyeColor.Items)
                {
                    if (curreyecolor.Code == CustToView.EyeColor)
                    {
                        custEyeColor.SelectedIndex = custEyeColor.Items.IndexOf(curreyecolor);
                        break;
                    }
                }
                custEyeColor = null;
                ComboBox custHairColor = (ComboBox)this.pwnapp_hair.Controls[0];
                foreach (ComboBoxData currhaircolor in custHairColor.Items)
                {
                    if (currhaircolor.Code == CustToView.HairColor)
                    {
                        custHairColor.SelectedIndex = custHairColor.Items.IndexOf(currhaircolor);
                        break;
                    }
                }
                custHairColor     = null;
                _physicaldescNote = CustToView.getPhysicalDescNote();
                if (_physicaldescNote.ContactNote != null)
                {
                    textBoxOthers.Text       = _physicaldescNote.ContactNote;
                    _strContactProductNoteId = _physicaldescNote.CustomerProductNoteId;
                }
                else
                {
                    textBoxOthers.Text = "";
                }
            }
        }