Example #1
0
 private void dgvBrand_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if ((int)e.ColumnIndex == dgvBrand.Columns[5].Index) //Brand region
     {
         if (e.Value != null)
         {
             mBrandRegionObj.Ask = Convert.ToString(e.Value);
             e.Value             = ((BrandRegionObj)mMasterBLL.selectObjbyAskobj("POS_Brand_Region", mBrandRegionObj)).BrandRegionName;
         }
     }
     if ((int)e.ColumnIndex == dgvBrand.Columns[6].Index) //brand type
     {
         if (e.Value != null)
         {
             mBranTypeObj.Ask = Convert.ToString(e.Value);
             e.Value          = ((BranTypeObj)mMasterBLL.selectObjbyAskobj("POS_Brand_Type", mBranTypeObj)).BrandTypeName;
         }
     }
     if ((int)e.ColumnIndex == dgvBrand.Columns[7].Index) //Brand status
     {
         if (e.Value != null)
         {
             mBrandStatusObj.Ask = Convert.ToString(e.Value);
             e.Value             = ((BrandStatusObj)mMasterBLL.selectObjbyAskobj("POS_Brand_Status", mBrandStatusObj)).BrandStatusName;
         }
     }
 }
Example #2
0
 public void bindForm(string aAsk)
 {
     try
     {
         mLibrary     = new Library();
         mLibrary.Ask = aAsk.ToString();
         //DataTable l_databale = new DataTable();
         //l_databale = mMasterBLL.Findby("LMS_Book", mLibrary);
         mLibrary = (CHARS.LMS.BOL.Library)mMasterBLL.selectObjbyAskobj("LMS_Library", mLibrary);
         bindUI();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Example #3
0
 public void bindForm(long aAsk)
 {
     try
     {
         mPublisher     = new CHARS.LMS.BOL.Publisher();
         mPublisher.Ask = aAsk.ToString();
         //DataTable l_databale = new DataTable();
         //l_databale = mMasterBLL.Findby("LMS_Category", mCategory);
         mPublisher = (Publisher)mMasterBLL.selectObjbyAskobj("LMS_Publish", mPublisher);
         bindUI();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Example #4
0
 public void bindForm(long aAsk)
 {
     try
     {
         mBook     = new Book();
         mBook.Ask = aAsk.ToString();
         DataTable l_databale = new DataTable();
         l_databale = mMasterBLL.Findby("LMS_Book", mBook);
         mBook      = (Book)mMasterBLL.selectObjbyAskobj("LMS_Book", mBook);
         bindUI();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Example #5
0
        private void dgvLibrary_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            if ((int)e.ColumnIndex == dgvLibrary.Columns[5].Index)
            {
                if (e.Value != null)
                {
                    mLibrary.Ask = Convert.ToString(e.Value);
                    mLibrary     = (Library)mMasterBLL.selectObjbyAskobj("LMS_Library", mLibrary);
                    e.Value      = mLibrary.Code;
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[6].Index)
            {
                if (e.Value != null)
                {
                    mCategory.Ask = Convert.ToString(e.Value);
                    mCategory     = (Category)mMasterBLL.selectObjbyAskobj("LMS_Category", mCategory);
                    e.Value       = mCategory.Code;
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[7].Index)
            {
                if (e.Value != null)
                {
                    mWriter.Ask = Convert.ToString(e.Value);
                    mWriter     = (Writer)mMasterBLL.selectObjbyAskobj("LMS_Writer", mWriter);
                    e.Value     = mWriter.Code;
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[8].Index)
            {
                if (e.Value != null)
                {
                    mPublisher.Ask = Convert.ToString(e.Value);
                    mPublisher     = (Publisher)mMasterBLL.selectObjbyAskobj("LMS_Publish", mPublisher);
                    e.Value        = mPublisher.Code;
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[9].Index)
            {
                if (e.Value != null)
                {
                    e.Value = Utility.getDateVale(e.Value.ToString());
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[10].Index)
            {
                if (e.Value != null)
                {
                    mPublishTime.Ask = Convert.ToString(e.Value);
                    mPublishTime     = (PublishTimes)mMasterBLL.selectObjbyAskobj("LMS_Publish_Time", mPublishTime);
                    e.Value          = mPublishTime.Code;
                }
            }

            if ((int)e.ColumnIndex == dgvLibrary.Columns[12].Index)
            {
                if (e.Value != null)
                {
                    e.Value = Utility.getDateVale(e.Value.ToString());
                }
            }
            if ((int)e.ColumnIndex == dgvLibrary.Columns[14].Index)
            {
                if (e.Value != null)
                {
                    if (e.Value.ToString() == "1")
                    {
                        e.Value = "New";
                    }
                    else if (e.Value.ToString() == "2")
                    {
                        e.Value = "Open";
                    }
                    else if (e.Value.ToString() == "3")
                    {
                        e.Value = "Rent";
                    }
                    if (e.Value.ToString() == "4")
                    {
                        e.Value = "Damage";
                    }
                }
            }
        }