public List<ProductDocument> GetUpdatedDocuments() {

            List<ProductDocument> documentList = new List<ProductDocument>();

            //gets existing documents 
            foreach (RepeaterItem item in rptDocuments.Items) {
                TextBox txtBox = item.FindControl("txtdocumentID") as TextBox;
                CheckBox chkBox = item.FindControl("chkRemove") as CheckBox;
                if (!chkBox.Checked) {
                    ProductDocument pd = new ProductDocument();
                    if (product != null) {
                        pd.ProductID = product.ProductID;
                    }
                    pd.DocumentID = Convert.ToInt64(txtBox.Text);
                    documentList.Add(pd);
                    pd = null;
                }
            }

            //gets new documents
            foreach (RepeaterItem item in rptNewDocuments.Items) {
                TextBox txtBox = item.FindControl("txtdocumentID") as TextBox;
                CheckBox chkBox = item.FindControl("chkAdd") as CheckBox;
                if (chkBox.Checked) {
                    ProductDocument pd = new ProductDocument();
                    if (product != null) {
                        pd.ProductID = product.ProductID;
                    }
                    pd.DocumentID = Convert.ToInt64(txtBox.Text);
                    documentList.Add(pd);
                    pd = null;
                }
            }

            return documentList;
        }
        public bool SaveProductDocument(int storeID, string cultureCode, ProductDocument pd) {
            try {

                this._sessionManager.OpenSession().SaveOrUpdateCopy(pd);
                this._sessionManager.OpenSession().Flush();
            } catch (Exception e) {
                LogManager.GetLogger(GetType()).Error(e);
                return false;
            }

            return true;
        }