예제 #1
0
        public bool UpdateNotesData(NotesTask NotesObject, string Mode, string CustId)
        {
            bool Update;

            try
            {
                string SqlQuery;
                if (Mode == "Update")
                {
                    SqlQuery = "Update Notes Set Date='" + NotesObject.Date + "', Details='" + NotesObject.Details + "' where ID=" + NotesObject.ID;
                }
                else
                {
                    SqlQuery = "Insert into Notes(CustId, Date, Details) values (" + CustId + ", '" + NotesObject.Date + "', '" + NotesObject.Details + "')";
                }

                Update = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Update = false;
            }
            finally
            {
            }
            return(Update);
        }
예제 #2
0
        public NotesTask GetNotesDataForID(NotesTask NotesObject, string Mode)
        {
            DataTable NotesTable        = new DataTable();
            NotesTask ReturnNotesObject = new NotesTask();

            try
            {
                string SqlQuery = "Select nt.* from Notes nt where nt.ID =" + NotesObject.ID.ToString();
                NotesTable = objAdaptor.FetchData(SqlQuery);

                if (NotesTable != null && NotesTable.Rows.Count == 1)
                {
                    ReturnNotesObject.ID      = int.Parse(NotesTable.Rows[0]["ID"].ToString());
                    ReturnNotesObject.CustID  = int.Parse(NotesTable.Rows[0]["CustID"].ToString());
                    ReturnNotesObject.Date    = NotesTable.Rows[0]["Date"].ToString();
                    ReturnNotesObject.Details = NotesTable.Rows[0]["Details"].ToString();
                }
            }
            catch
            {
            }
            finally
            {
            }
            return(ReturnNotesObject);
        }
예제 #3
0
        private void InsertNotes()
        {
            try
            {
                bool      update      = false;
                NotesTask NotesObject = new NotesTask();
                //NotesObject.CustID = Convert.ToInt32(CustomerComboBox.SelectedItem.Value);
                //NotesObject.Date = NCDateTextbox.Text;
                NotesObject.Date    = NCDateEdit.Text;
                NotesObject.Details = NCDetailTextbox.Text;

                update = CustomerServiceBL.CustomerDetails.Ins.UpdateNotesData(NotesObject, "Insert", CustomerComboBox.SelectedItem.Value.ToString());
                if (update)
                {
                    successDiv.Style.Value = "display: block";
                    errorDiv1.Style.Value  = "display: none";
                    successDiv.InnerText   = "New Notes has been successfully created";
                }
                else
                {
                    successDiv.Style.Value = "display: none";
                    errorDiv1.Style.Value  = "display: block";
                    errorDiv1.InnerText    = "Notes has NOT been created";
                }
            }
            catch (Exception ex)
            { throw ex; }
            finally
            {
            }
        }
예제 #4
0
        public DataTable GetAllNotesData()
        {
            DataTable NotesDataTable = new DataTable();
            NotesTask ReturnObject   = new NotesTask();

            try
            {
                string SqlQuery = "Select * from Customer, Notes";
                NotesDataTable = objAdaptor.FetchData(SqlQuery);
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
            return(NotesDataTable);
        }
예제 #5
0
                void SetupDisplay(View view)
                {
                    // setup our message list view
                    MessagesListView = view.FindViewById <ListView>(Resource.Id.notes_details_list);
                    MessagesListView.SetOnTouchListener(this);
                    MessagesListView.Divider = null;

                    // setup the messages list
                    MessagesListView.Adapter = new NotesDetailsArrayAdapter(this);

                    // load the placeholder and series image
                    SeriesBillboard = null;

                    bool imageExists = TryLoadBanner(NotesTask.FormatBillboardImageName(Series.SeriesName));

                    if (imageExists == false)
                    {
                        //string widthParam = string.Format( "&width={0}", NavbarFragment.GetContainerDisplayWidth_Landscape( ) );

                        // use the placeholder and request the image download
                        FileCache.Instance.DownloadFileToCache(Series.BillboardUrl, NotesTask.FormatBillboardImageName(Series.SeriesName), null,
                                                               delegate
                        {
                            TryLoadBanner(NotesTask.FormatBillboardImageName(Series.SeriesName));
                        });


                        AsyncLoader.LoadImage(PrivateNoteConfig.NotesMainPlaceholder, true, false,
                                              delegate(Bitmap imageBmp)
                        {
                            if (FragmentActive == true && imageBmp != null)
                            {
                                PlaceholderImage = imageBmp;

                                RefreshList( );

                                return(true);
                            }

                            return(false);
                        });
                    }
                }
예제 #6
0
 private void FillNotesDetails(int ID)
 {
     try
     {
         NotesTask NotesObject = new NotesTask();
         NotesTask ReturnNotes = new NotesTask();
         NotesObject.ID = ID;
         ReturnNotes    = CustomerServiceBL.CustomerDetails.Ins.GetNotesDataForID(NotesObject, "");
         if (ReturnNotes != null)
         {
             NCDateEdit.Date = DateTime.Parse(ReturnNotes.Date.ToString());
             //NCDateTextbox.Text = ReturnNotes.Date.ToString();
             NCDetailTextbox.Text = ReturnNotes.Details.ToString();
         }
     }
     catch (Exception ex)
     { throw ex; }
     finally
     {
     }
 }
예제 #7
0
 public bool UpdateNotesData(NotesTask NotesObject, string Mode, string CustId)
 {
     return(CustomerTrackingDL.CustomerDetails.Ins.UpdateNotesData(NotesObject, Mode, CustId));
 }
예제 #8
0
 public NotesTask GetNotesDataForID(NotesTask NotesObject, string Mode)
 {
     return(CustomerTrackingDL.CustomerDetails.Ins.GetNotesDataForID(NotesObject, Mode));
 }