public string DeleteChallan(string strPartyName, string strChallanNo, string strLCNo, string strReason)
        {
            try
            {
                deleteChallanOutDataTableAdapter       adp  = new deleteChallanOutDataTableAdapter();
                sprDeleteFromStockRegisterTableAdapter adp2 = new sprDeleteFromStockRegisterTableAdapter();
                getTableTableAdapter          adp3          = new getTableTableAdapter();
                tblDeletedChallanTableAdapter adp4          = new tblDeletedChallanTableAdapter();

                foreach (var x in adp3.GetTableData(strPartyName, Convert.ToInt32(strChallanNo), strLCNo))
                {
                    adp2.DeleteStockData(Convert.ToInt32(strChallanNo), strPartyName, x.strDetails, Convert.ToInt32(x.intQuantity));
                }

                adp.DeleteChallanOutData(Convert.ToInt32(strChallanNo), strPartyName, strLCNo);

                adp4.InsertDeleteReason(Convert.ToInt32(strChallanNo), strReason);

                return("Delete Successfully");
            }
            catch (Exception e)
            {
                return("The Challan is not delete Successfully !!!");
            }
        }
        public DataTable GetTableData(string strPartyName, string strChallanNo, string strLCNo)
        {
            getTableTableAdapter adp = new getTableTableAdapter();
            DataTable            dt  = adp.GetTableData(strPartyName, Convert.ToInt32(strChallanNo), strLCNo);

            return(dt);
        }