Ejemplo n.º 1
0
		public BEDocuments SelectByDocumentID(int DocumentID)
		{
			BEDocuments ds = new BEDocuments();
			DADocumentInventoryItems da = new DADocumentInventoryItems();
			da.SelectByDocumentID(DocumentID, ds.tbl_DocumentInventoryItems);
			return ds;
		}
Ejemplo n.º 2
0
		public BEDocuments SelectAllInactive()
		{
			BEDocuments ds = new BEDocuments();
			DADocumentInventoryItems da = new DADocumentInventoryItems();
			da.SelectAllInactive(ds.tbl_DocumentInventoryItems);
			return ds;
		}
Ejemplo n.º 3
0
		public BEDocuments SelectAllWithROColumns()
		{
			BEDocuments ds = new BEDocuments();
			DADocuments da = new DADocuments();
			da.SelectAllWithReadOnlyColumns(ds.tbl_Documents);
			return ds;
		}
Ejemplo n.º 4
0
		public BEDocuments SelectByCompanyIDAndDocumentID(int CompanyID, int DocumentID)
		{
			BEDocuments ds = new BEDocuments();
			DADocumentInventoryItems da = new DADocumentInventoryItems();
			da.SelectByCompanyIDAndDocumentID(CompanyID, DocumentID, ds.tbl_DocumentInventoryItems);
			return ds;
		}
Ejemplo n.º 5
0
 public BEDocuments SelectAllInactive()
 {
     DADocuments da = new DADocuments();
     BEDocuments ds = new BEDocuments();
     da.SelectAllInactive(ds.tbl_Documents);
     return ds;
 }
Ejemplo n.º 6
0
 public BEDocuments SelectAllInactive()
 {
     BEDocuments ds = new BEDocuments();
     DADocumentCategories da = new DADocumentCategories();
     da.SelectAllInactive(ds.tbl_DocumentCategories);
     return ds;
 }
Ejemplo n.º 7
0
		private BEDocuments SelectShippingDocumentsByProductIDorWorkshopIDorNonSalesInventoryIDorWorkshopSuppliesID(int ProductID, int WorkshopID, int NonSalesInventoryID, int WorkshopSuppliesID)
		{
			BEDocuments ds = new BEDocuments();
			DADocuments da = new DADocuments();

			da.SelectIncludedByProductIDorWorkshopIDorNonSalesInventoryIDorWorkshopSuppliesID(ProductID, WorkshopID, NonSalesInventoryID, WorkshopSuppliesID, ds.tbl_Documents);
			return ds;
		}
Ejemplo n.º 8
0
		public BEDocuments SelectDocumentInventoryItemByID(int DocumentInventoryItemID)
		{
			BEDocuments ds = new BEDocuments();
			DADocumentInventoryItems da = new DADocumentInventoryItems();

			da.SelectByID(DocumentInventoryItemID.ToString(), ds.tbl_DocumentInventoryItems);
			return ds;
		}
Ejemplo n.º 9
0
        public BEDocuments SelectByID(int Documentid)
        {
            DADocuments daD = new DADocuments();
            BEDocuments ds = new BEDocuments();
            daD.SelectByID(Documentid.ToString(), ds.tbl_Documents);

            return ds;
        }
Ejemplo n.º 10
0
		public BEDocuments SelectShippingDocumentsByWorkshopInstanceID(int WorkshopInstanceID)
		{
			BEDocuments ds = new BEDocuments();
			DADocuments da = new DADocuments();

			da.SelectShippingDocumentsByWorkshopInstanceID(WorkshopInstanceID, ds.tbl_Documents);
			return ds;
		}
Ejemplo n.º 11
0
		public BEDocuments SelectShippingDocumentsByOrderID(int OrderID)
		{
			BEDocuments ds = new BEDocuments();
			DADocuments da = new DADocuments();

			da.SelectShippingDocumentsByOrderID(OrderID, ds.tbl_Documents);
			return ds;
		}
Ejemplo n.º 12
0
        public BEDocuments SelectByID(int DocumentCatgeoryID)
        {
            BEDocuments ds = new BEDocuments();
            DADocumentCategories da = new DADocumentCategories();

            da.SelectByID(DocumentCatgeoryID.ToString(), ds.tbl_DocumentCategories);
            return ds;
        }
Ejemplo n.º 13
0
        public BEDocuments SelectActiveByDocumentCategoryID(int DocumentCategoryID)
        {
            DADocuments da = new DADocuments();
            BEDocuments ds = new BEDocuments();

            da.SelectActiveByDocumentCategoryID(DocumentCategoryID, ds.tbl_Documents);

            return ds;
        }
Ejemplo n.º 14
0
        public BEDocuments SelectActiveWithDocumentCategories()
        {
            DADocuments da = new DADocuments();
            BEDocuments ds = new BEDocuments();

            da.SelectActiveWithDocumentCategories(ds.tbl_Documents);

            return ds;
        }
        protected DataView GetData()
        {
            BPDocumentCategories bp = new BPDocumentCategories();
            DSDocuments = bp.SelectAll();

            DSDocuments.tbl_DocumentCategories.DefaultView.RowFilter = RowFilter("DocumentCategoryName", ((LinkButton)rptLetters.Items[0].FindControl("lnkLetter")).CommandName, "DocumentCategoryActive", lstActive.SelectedValue);
            DSDocuments.tbl_DocumentCategories.DefaultView.Sort = DSDocuments.tbl_DocumentCategories.DocumentCategoryNameColumn.ColumnName;

            return DSDocuments.tbl_DocumentCategories.DefaultView;
        }
Ejemplo n.º 16
0
        protected DataView GetData()
        {
            BPDocuments bp = new BPDocuments();

            if (ddlDocumentCategories.SelectedValue == "-1")
                DSDocuments = bp.SelectWithDocumentCategories();
            else
                DSDocuments = bp.SelectByDocumentCategoryID(Convert.ToInt32(ddlDocumentCategories.SelectedValue));


            DSDocuments.tbl_Documents.DefaultView.RowFilter = RowFilter("DocumentAlias", ((LinkButton)rptLetters.Items[0].FindControl("lnkLetter")).CommandName, "DocumentActive", lstActive.SelectedValue);
            return DSDocuments.tbl_Documents.DefaultView;
        }
Ejemplo n.º 17
0
		protected void BindDocuments()
		{
			BPDocuments bpu = new BPDocuments();
			DSDocuments = new BEDocuments();

			if (ddlDocumentCategories.SelectedValue != "-1")
			{
				DSDocuments.Merge(bpu.SelectAllByDocumentCategoryID(Convert.ToInt32(ddlDocumentCategories.SelectedValue)));
			}
			else
			{
				DSDocuments.Merge(bpu.SelectAllWithDocumentCategories());
			}

			int DocumentCategoryID = -1;
			Boolean blnNew = true;

			ddlDocuments.Items.Clear();

			ddlDocuments.Items.Add(new ListItem("No Document", "0"));
			foreach(DataRow dr in DSDocuments.tbl_Documents.Rows)
			{
				if ((int) dr["DocumentCategoryID"] != DocumentCategoryID)
				{
					DocumentCategoryID = (int) dr["DocumentCategoryID"];
					blnNew = true;
				}

				if (blnNew)
				{
					ddlDocuments.Items.Add(new ListItem("-- " + dr["DocumentCategoryName"] + " --", ""));
					blnNew = false;
				}
				
				ddlDocuments.Items.Add(new ListItem(HttpUtility.HtmlDecode("    ") + dr["DocumentAlias"].ToString(), dr["DocumentID"].ToString()));
			}

			if (SelectedDocument != 0)
			{
				ddlDocuments.SelectedValue = SelectedDocument.ToString();
			}
		}
Ejemplo n.º 18
0
		protected void BindAvailableDocuments()
		{
			BPDocuments bpu = new BPDocuments();
			DSDocuments = new BEDocuments();

			if (FilterID != -1)
			{
				DSDocuments.Merge(bpu.SelectAllByDocumentCategoryID(FilterID));
			}
			else
			{
				DSDocuments.Merge(bpu.SelectAllWithDocumentCategories());
			}

			int DocumentCategoryID = -1;
			Boolean blnNew = true;

			StringBuilder returnDocuments = new StringBuilder(10000);
			 
			returnDocuments.Append("none,No Document|");

			foreach(DataRow dr in DSDocuments.tbl_Documents.Rows)
			{
				if ((int) dr["DocumentCategoryID"] != DocumentCategoryID)
				{
					DocumentCategoryID = (int) dr["DocumentCategoryID"];
					blnNew = true;
				}

				if (blnNew)
				{
					returnDocuments.Append(",-- " + dr["DocumentCategoryName"] + " --|");
					blnNew = false;
				}
				
				returnDocuments.Append(dr["DocumentID"].ToString() + "," + HttpUtility.HtmlDecode("    ") + dr["DocumentAlias"].ToString() + "|");
			}

			lblScript.Text = "<script Language=\"Javascript\">window.parent.handleResponse('" + returnDocuments + "', 'Document')</script>";
		}
Ejemplo n.º 19
0
		public BEDocuments SelectActiveAttachmentsByCompanyIDAndInventoryID(int CompanyID, int InventoryID)
		{
			DADocuments da = new DADocuments();
			BEDocuments ds = new BEDocuments();

			da.SelectActiveAttachmentsByCompanyIDAndInventoryID(CompanyID, InventoryID, ds.tbl_Documents);

			return ds;
		}
Ejemplo n.º 20
0
 public void Update(BEDocuments ds)
 {
     DADocuments da = new DADocuments();
     da.Update(ds.tbl_Documents);
 }
Ejemplo n.º 21
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.DSDocuments = new BEDocuments();
			this.DSDocuments.BeginInit();
			this.btnDocument.Click += new EventHandler(this.btnDocument_Click);
			this.ddlDocumentCategories.SelectedIndexChanged += new EventHandler(this.ddlDocumentCategories_SelectedIndexChanged);
			this.dgDocs.ItemCommand += new DataGridCommandEventHandler(this.dgDocs_ItemCommand);
			//this.dgDocs.ItemDataBound += new DataGridItemEventHandler(dgDocs_ItemDataBound);
			// 
			// DSDocuments
			// 
			this.DSDocuments.DataSetName = "DSDocuments";
			this.DSDocuments.Locale = new CultureInfo("en-US");
			this.Load += new EventHandler(this.Page_Load);
			this.DSDocuments.EndInit();

		}
Ejemplo n.º 22
0
		protected string GetDocumentName(object strDocumentID)
		{
			if (!Convert.IsDBNull(strDocumentID))
			{
				BEDocuments DSDocuments = new BEDocuments();
				int documentID = Convert.ToInt32(strDocumentID);
				BPDocuments bp = new BPDocuments();
				DSDocuments = bp.SelectAll();
				string DocumentName = DSDocuments.tbl_Documents.FindByDocumentID(documentID).DocumentName;

				return "Uploads/" + DocumentName;
			}
			else
			{
				return "";
			}
		}
Ejemplo n.º 23
0
		private void BindDSDocuments()
		{
			BPDocuments bp = new BPDocuments();
			if (ddlDocumentCategories.SelectedValue == "-1")
			{
				DSDocuments = bp.SelectAllWithDocumentCategories();
			}
			else
			{
				DSDocuments = bp.SelectAllByDocumentCategoryID(Convert.ToInt32(ddlDocumentCategories.SelectedValue));
			}
			
			DSDocuments.tbl_Documents.DefaultView.Sort = "DocumentAlias";
			DSDocuments.tbl_Documents.DefaultView.RowFilter = RowFilter("DocumentAlias", "DocumentActive");

			letters_Bind();
			dgDocs.DataBind();

			SetPagerButtons();
			if (DSDocuments.tbl_Documents.DefaultView.Count ==  0)
			{
				lblError.Visible = true;
				lblError.Text = "0 Records found.";
			}

			else
			{
				lblError.Visible = false;
				lblError.Text = "";
			}
		}
Ejemplo n.º 24
0
		protected void BindDocumentCategories()
		{
			ddlDocumentCategories.Attributes.Add("onchange", "callToServer(this.form.name, this.name, 'Document', '" + ddlDocuments.ClientID + "', 'DocumentLoader.aspx');");
			//ddlDocumentCategories.Attributes.Add("onchange", "alert('hello');");

            BPDocumentCategories bp = new BPDocumentCategories();
            DSDocumentCategories = bp.SelectAllActive();
            DSDocumentCategories.tbl_DocumentCategories.DefaultView.Sort = "DocumentCategoryName";

            ddlDocumentCategories.DataSource = DSDocumentCategories.tbl_DocumentCategories.DefaultView;
            ddlDocumentCategories.DataValueField = DSDocumentCategories.tbl_DocumentCategories.DocumentCategoryIDColumn.ColumnName;
            ddlDocumentCategories.DataTextField = DSDocumentCategories.tbl_DocumentCategories.DocumentCategoryNameColumn.ColumnName;
            ddlDocumentCategories.DataBind();

			ddlDocumentCategories.Items.Insert(0, new ListItem("(All Document Categories)", "-1"));
		}
Ejemplo n.º 25
0
        private bool SaveDocumentInfo()
        {
            bool isNew = false;
            bool updateExisting = false;
            string strFileName = null;
            BPDocuments bp = new BPDocuments();
            BEDocuments ds = new BEDocuments();

            if (DocumentID > 0)
            {
                if (inpUpload.PostedFile.FileName == "")
                    updateExisting = true;
            }
            else
                isNew = true;

            if (!updateExisting)
                strFileName = UploadFunctions.UploadFile(inpUpload.PostedFile, Server.MapPath(ConfigurationManager.AppSettings["UploadsPath"]), UploadTypes.Document);

            if (strFileName != null || updateExisting)
            {
                BEDocuments.tbl_DocumentsRow doc;

                if (isNew)
                    doc = ds.tbl_Documents.Newtbl_DocumentsRow();
                else
                {
                    ds = bp.SelectByID(DocumentID);
                    doc = ds.tbl_Documents.FindByDocumentID(DocumentID);
                }

                doc.DocumentCategoryID = Convert.ToInt32(ddlDocumentCategories.SelectedValue);

                if (!updateExisting)
                    doc.DocumentName = strFileName;

                doc.DocumentAlias = txtDocumentAlias.Text;

                if (txtDocumentDescription.Text.Trim() != "")
                    doc.DocumentDescription = txtDocumentDescription.Text;
                else
                    doc.SetDocumentDescriptionNull();


                string path = ConfigurationManager.AppSettings["UploadsPath"];
                if (File.Exists(Server.MapPath(path + doc.DocumentName)))
                {
                    FileInfo file = new FileInfo(Server.MapPath(path + doc.DocumentName));
                    doc.DocumentSize = file.Length;
                }
                else
                    doc.DocumentSize = 0;

                doc.DocumentActive = chkDocumentActive.Checked;
                doc.DateModified = DateTime.Now;
                doc.ModifiedByAdminID = PageUserID;

                if (isNew)
                {
                    doc.DateCreated = DateTime.Now;
                    ds.tbl_Documents.Addtbl_DocumentsRow(doc);
                }

                bp.Update(ds);
                return true;
            }
            else
                return false;
        }
Ejemplo n.º 26
0
		public void Update(BEDocuments ds)
		{
			DADocumentInventoryItems da = new DADocumentInventoryItems();
			da.Update(ds.tbl_DocumentInventoryItems);
		}